Friday, April 23, 2010

Cross-Page Posting in ASP .NET

Whenever you send a request to the server it sends request to the same page. Cross_page posting means it will send request to the another page. we can achieve. this through postback url property.

When we have to post data from one page to another in application. we used server.transfer method but in this the URL remains the same but in cross page posting there is little different there is normal post back is done but in target page we can access values of server control in the source page.This is quite simple we have to only set the PostBackUrl property of Button,LinkButton or imagebutton which specifies the target page.In target page we can access the PreviousPage property.And we have to use the @PreviousPageType directive.We can access control of PreviousPage by using the findcontrol method.When we set the PostBackURL property ASP.NET framework bind the HTML and Javascript function automatically.

No comments:

Post a Comment