Navigation Between The Pages: Response - Redirect
Navigation Between The Pages: Response - Redirect
Navigation can cause data loss if it not properly handled. We do have many
techniques to transfer data from one page to another but every technique
has its own importance and benefits.
Response.Redirect
Server.Transfer
Server.Exceute
Cross page posting
Response.Redirect
This is one of the navigation techniques in ASP.NET to move from one web
form to another. It redirects a client to a new URL. Specifies the new URL
and whether execution of the current page should terminate.
Syntax:
Response.Redirect("WebForm1.aspx");
Server. Transfer
This is the syntax for using this technique, basically it expects the URL of
where you want to navigate to.
1. Server.Transfer("Webform2.aspx");
Server.Exceute
It is also a navigation technique similar to server.transfer but has a different behavior when doing
the process.
Server.Execute("WebForm3.aspx");
The Cross Page posting technique allows a web form to post on another
web form on button click. The PostbackUrl property of the button is set to
the page where you want to do cross-page posting.
Controls are small building blocks of the graphical user interface, which
include text boxes, buttons, check boxes, list boxes, labels, and numerous
other tools. Using these tools, the users can enter data, make selections
and indicate their preferences.
Controls are also used for structural jobs, like validation, data access,
security, creating master pages, and data manipulation.
HTML controls
ASP.NET server controls are the primary controls used in ASP.NET. These
controls can be grouped into the following categories:
Validation controls - These are used to validate user input and they work by running
client-side script.
Data source controls - These controls provides data binding to different data sources.
Data view controls - These are various lists and tables, which can bind to data from
data sources for displaying.
Personalization controls - These are used for personalization of a page according to
the user preferences, based on user information.
Master pages - These controls provide consistent layout and interface throughout the
application.
Navigation controls - These controls help in navigation. For example, menus, tree view
etc.
Rich controls - These controls implement special features. For example, AdRotator,
FileUpload, and Calendar control.
https://www.youtube.com/watch?v=7gpmlAF2Dz4
However like other ASP.NET server controls, these AJAX server controls also
can have methods and event handlers associated with them, which are
processed on the server side.
The control toolbox in the Visual Studio IDE contains a group of controls
called the 'AJAX Extensions'
If you create an 'Ajax Enabled site' or add an 'AJAX Web Form' from the
'Add Item' dialog box, the web form automatically contains the script
manager control. The ScriptManager control takes care of the client-side
script for all the server side controls.
For example, if a button control is inside the update panel and it is clicked,
only the controls within the update panel will be affected, the controls on
the other parts of the page will not be affected. This is called the partial
post back or the asynchronous post back.