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

Why does an organization need to manage the workloads, Why does an organiza...

Why does an organization need to manage the workloads? The workload can be explained as an independent service or a set of code that can be implemented. It can be everything f

What do you understand by soap encoding, What do you understand by SOAP enc...

What do you understand by SOAP encoding? The Serialization of the types, such as integers and strings, inside a SOAP message is known as encoding. The SOAP objects use XML elem

Project life cycle, Explain project life cycle. Figure: -Life cyc...

Explain project life cycle. Figure: -Life cycle of a project There are 5 stages of any project initiating, planning, executing, controlling, & closeout. These are the

Gmail, how make the google sign up page?

how make the google sign up page?

Write a program of changing string order – c# program, Write a Program of C...

Write a Program of Changing String Order - C# Language  using System;   class Prog3_2  {       public static void Main(String [] args)    {     Console.Write(ar

Explain difference between the clone and copy methods, What is the differen...

What is the difference between the Clone() and Copy() methods of the DataSet class? The Clone() method copies only the structure of a DataSet. The copied structure having all t

Abstract classes, What are abstract classes? The features of the abstra...

What are abstract classes? The features of the abstract class are as follows:- 1.     You can not create an object of the abstract class. 2.     The Abstract class is des

Want c# single user login per session, Want C# Single User Login per sessio...

Want C# Single User Login per session Project Description: I need to save simulatenious logins for one account such as one user has a spottily premium account and someone tri

I need mvc developer, Project Description: Hi I am seeking for an MVC de...

Project Description: Hi I am seeking for an MVC developer who is good at Online Store, CMS and Ecommerce. Skills required: .NET, HTML, eCommerce, Shopping Carts, Website D

Project, Sir can you suggest me a project that I am do that i present in la...

Sir can you suggest me a project that I am do that i present in last year project work

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