C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Determining How ASP.NET Web Pages were invoked.


Posted Date: 13 May 2008    Resource Type: Articles    Category: .NET Framework
Author: Ramasamy.NMember Level: Gold    
Rating: Points: 50



Whether by an original request (an HTTP GET), a postback(an HTTP POST), a
cross-page post from another page, transfer from another page using the Transfer
method or using a callback from the browser.


The Page Page class exposes a set of properties that you can use to determine
how a page was invoked.


1. IsPostBack

2. PreviousPage

3. IsCrossPagePostBack

4. IsCallBack


he following table lists ways in which a page can be invoked and the corresponding Page property values.

Original request
• IsPostBack is set to false.
• PreviousPage is set to null (Nothing in Visual Basic).
• IsCallback is set to false.
Postback
• IsPostBack is set to true.
• PreviousPage is set to null (Nothing in Visual Basic).
• IsCallback is set to false.
Cross-page posting
• IsPostBack is set to false.
• PreviousPage references the source page.
• IsCrossPagePostBack is set to true.
• IsCallback is set to false.
Server transfer
• IsPostBack is set to false.
• PreviousPage references the source page.
• IsCrossPagePostBack that is referenced in the PreviousPage is set to alse.
• IsCallback is set to false.
Callback
• IsPostBack is set to false.
• PreviousPage is set to null (Nothing in Visual Basic).
• IsCallback is set to true.
Note

Be sure you test the IsCrossPagePostBack property of the page that is referenced
in PreviousPage. The IsCrossPagePostBack property of the current page always
returns false.






Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Events in ASP.NET Master and Content Pages
Previous Resource: NET Framework Journey from 1.0 to 3.5
Return to Discussion Resource Index
Post New Resource
Category: .NET Framework


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use