Cross page posting, DOT NET Programming

Assignment Help:

What is cross page posting?

By default, the button controls in the ASP.NET pages post back to the similar page that contains button, where you can write an event handler for the post. In most of the cases this is the desired behavior, but occasionally you will also want to be able to post to other page in your application. The Server. Transfer process can be used to move b/w pages, however the URL doesn't change. In spite, the cross page posting feature in ASP.NET 2.0 allows you to fire a normal post back to a different page in the application. In the target page, you can access the values of server controls in the source page that initiated the post back.

To use the cross page posting, you can set the PostBackUrl property of a LinkButton,  Button or ImageButton control, which specifies the target page. In the target page, you can then access the PreviousPage property to retrieve the values from the source page. By default, the PreviousPage property is of type Page, so you must access controls by using the Find Control Process. You can also enable strongly-typed access to the source page by setting the @PreviousPageType directive in the target page to the virtual path or Type name of source page.

Here is a step-by-step guide for implementing the cross-page post back using controls that implement the IButtonControl interface.

1)    Create a Web Form and insert a Button control on it using the VS .NET designer.

2)     Set the button's PostBackUrl property to the Web Form you want to post back. For instance in this case it is "nextpage.aspx"

When the PostBackUrl property of the IButtonControl is set, the ASP.NET framework binds the corresponding HTML element to new JavaScript function named WebForm_DoPostBackWithOptions. The corresponding HTML rendered by the ASP.NET 2.0 will look like this:


Related Discussions:- Cross page posting

Allow a webpage and restrict access to other domains, We previously use Sit...

We previously use Site content filtering inside Netkiosk But at present this blocks sites. or keywords We now also require a Whitelist that allows. 1) An entire domain www

Grid view, to design a grid view and edit and delete the data

to design a grid view and edit and delete the data

What is delay signing, Delay signing During the development process you...

Delay signing During the development process you  need strong keys name  to be exposed to the developer which is not a good practice from security aspect .In such situations yo

Web from designer inline whiledataread from dbase show dr1, http://www.w3...

http://www.w3.org/1999/xhtml"> runat="server"> Ürün Adi : --------------- using System

Precautions for state server mode working, What are the precautions so that...

What are the precautions so that StateServer Mode work properly? Following are some points to remember so that StateServer Mode works properly:- a) StateServer mode session

Methods provided by the command object, What are the methods provided by th...

What are the methods provided by the command object? The command objects used to connect the connection object to the Datareader or the dataset. The command object provided som

Indexes, What are indexes? The Indexes in the SQL Server are similar to...

What are indexes? The Indexes in the SQL Server are similar to the indexes in books. They help SQL Server to retrieve the data quickly.These are classified into clustered and n

Types of validation controls in asp.net, How many types of validation contr...

How many types of validation controls are provided by ASP.NET   The six main types of validation controls are as follows:- 1) Required Field Validator: This validator che

Explain the limitations of ajax, Explain the limitations of AJAX. The f...

Explain the limitations of AJAX. The following are the limitations of AJAX: It is complex to bookmark a particular state of the application. Function given in the code-be

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd