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

I need kinect developer c++, I need Kinect Developer c++ We are creating...

I need Kinect Developer c++ We are creating a fitting room with Kinnect and I need some questions answered like how to detect if a person turns around, how to make the clothing

Ways to implement locking in ado.net, What are the ways to implement lockin...

What are the ways to implement locking in ADO.NET? There are many ways to implement locking using ADO.NET which are shown below:- 1)Whenever we call "Update" method of DataA

Training and placement cell, Training and placement cell Project Descrip...

Training and placement cell Project Description: It is about placement and training cell of any college. I have made this for one college. If needed, i can modify it. Student

Explain image generator (ngen.exe), Image Generator (Ngen.exe) The Ngen...

Image Generator (Ngen.exe) The Ngen.exe (Native Image Generator) allows you to run the JIT compiler on your assembly's MSIL and generate native machine code which is cached to

Advantages of using permission sets and code groups, This assignment docume...

This assignment document will be distributed from Blackboard assignment folder. Some parts of the assignments will require you to research answers from your text book (you must rea

Globalization, how to access global resource file using javascript

how to access global resource file using javascript

How i increment my new file if the file is already present, I have the pro...

I have the project that takes screen shots and saves in the specific folder.(eg.Screen0001) but the problem is that if i close application and run it again then it replace the exis

Explain hybrid and community cloud, Explain hybrid and community cloud. ...

Explain hybrid and community cloud. The hybrid cloud having of multiple service providers. This model integrates several cloud services for Hybrid Web hosting. It is basically

Define the term viewstate as used in the asp.net framework, Problem: (a...

Problem: (a) Define the term ViewState as used in the ASP.NET framework. (b) What is a StateBag class? Give a simple example to support your answer. (c) (i) Distingui

Shared (vb.net)/static(c#) variables, What are shared (VB.NET)/Static(C#) v...

What are shared (VB.NET)/Static(C#) variables? Shared/Static classes are used when a class gives functionality which is not specific to any instance. In brief if you want an ob

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