Free Jobs
Reference


DotNet Questions: ASPNET (128) C#.NET (55) VB.NET (16) AJAX (48) Silver Light (25) WCF (70) WPF (34) WWF (17) .NET 3.5 (29) SQL SERVER (50) Other (9)

Question: What is crosspage posting in ASP.NET and what is its use

To get the Posted Questions details daily in your mail Click Here

Share this question on Facebook/Twitter/Orkut Bookmark and Share





User: dhiraj5079 Post Date: 21 Mar 2012 23:25

Introduction:
What is crosspage posting in ASP.NET and what is its use



Answer:



In ASP.NET,when we click a button Web page post the page to itself.

But cross page posting is to post one page to another page.

This is used generally in a multi page forms where we put previous next

button and these buttons are used to post one form data to another form

so that last form can have the full data.

Cross page posting can be done in the following ways:

A.Using Button and Postback url

<asp:Button ID="Button1" runat="server" Text="" PostBackUrl="~/DestinationPage.aspx" />


B.Using server.Transfer

server.Transfer has following three overload.

1. Server.Transfer("site url");

2. Server.Transfer("site url",true);

3. Server.Transfer(CustomHandler,true);

 

To Check for CrossPagePostback check the following in the destination page

1.Page.PreviousPage is NOT NULL,

2.PreviousPage.IsCrossPagePostback is true

TextBox txtName = (TextBox)previousPage.FindControl("txtName");




About Writer:
Hi,I am IT Professional From Mumbai


Writer's Link: http://

Writer's Email:







Comments:




Post Comment





Similar Questions Top QuestionsLatest Questions Other Questions by this Author







www.freejobsreference.com Copyright © 2009-2011 | All Rights Reserved
All content of this website is protected by copyright laws and should not be reproduced in any form or by any means without written permission
(Best viewed in IE 8.0+ or Firefox 3.0+ at resolution of 1024 * 768 or higher)