Server-Side Encoding
Server-Side coding refers to the process of developing code that runs on the server side of web applications. This type of coding includes tasks such as interacting with the database on the server side, executing business logic, processing user requests, and creating dynamic content.
Server-Side coding is performed using a server-side programming language and is run on a web server running on the server side. Server-side code typically processes HTTP requests, performs database queries, processes data, and produces responses in HTML, JSON, or other formats.
Server-Side Coding for Forms
- The Form breakdown to be encoded on Server-Side is opened.
- The Server breakdown opens.
- Depending on the type of development to be made, .cs or . Controller.cs is selected.
FormName.cs
* It is the file format in which the management of design objects and events developed for the form can be provided.
- Assigning a value to an example TextBox object
''cSharp
public void SetFullName()
{
string firstName = Session.User.FirstName;
string lastName = Session.User.LastName;
string fullName = firstName + " " + lastName;
TextBox1.Text = fullName;
}
```
- Executing the event that is raised when the value of a sample TextBox object changes
1. The properties of the corresponding object are opened.
2. In the Server section of the Events tab, there is an OnValueChanged event.
3. An event is created for this event.
4. ''cSharp
void TextBox1_OnValueChanged(object sender, PropertyChangedEventArgs<
string>
e)
{
string newValue = e.NewValue;
string oldValue = e.OldValue;
if(newValue == oldValue)
{
ShowMessage("Bildîmî !","In TextBox1, the previous and new values are the same.",AlertType.Info);
}
else
{
ShowMessage("Bildileme!", "In TextBox1, the previous and new values are different.", AlertType.Info);
}
}
```