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

Define assembly-types of assembly, Assembly: 1) Assembly is a unit of d...

Assembly: 1) Assembly is a unit of deployment such as EXE or a DLL. 2) An assembly consists one or more files (dlls, exe's, html files etc.),& represents a group of resources,

Need data stream from laptop to phone, Need Data Stream from Laptop to Phon...

Need Data Stream from Laptop to Phone Project Description: I have a notepad file that is automatically generated in a set file name and format by acquisition software and wri

In what order do the events of an aspx page execute, In what order do the e...

In what order do the events of an ASPX page execute. As a developer is it important to understand these events?   If you try to access it in Page_Load that is way previous than

Arithmetic operations, write a program in C# to perform arithmetic operatio...

write a program in C# to perform arithmetic operation

A super-hero sharepoint developer with great design skills, A Super-hero Sh...

A Super-hero SharePoint developer with great design skills Project Description: US: Our start-up company prepares a very innovative and cool SharePoint related product with c

Need a a fresh web project utilizing asp.net 4.5, A fresh web project utili...

A fresh web project utilizing ASP.NET 4.5, MVC 5 with Visual Studio 2013 a) Excellent web layout DESIGN skills using CSS. b) Solid experience with ASP.NET 4.0 MVC 4. c) Cu

Various ways of authentication techniques in asp.net, What are the various ...

What are the various ways of authentication techniques in ASP.NET? The Selection of  an authentication provider is as simple as making an entry in  the web.config file of  the

I need support on .net c# automation testing, Project Description: I nee...

Project Description: I need support on .net c# automation testing Additional Project Description: Project is on Visual Studio, creating Automation and TFS Test development

Penny auction auto bidder software, Project Description I require a Auto...

Project Description I require a Automated penny auction bidder software (bidder robot, sniper software, Autobidder ) that put bid at specific milliseconds Nanoseconds from the e

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

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