Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / March 2008

Tip: Looking for answers? Try searching our database.

How does asp.net know whether it is a postback or not??

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
lander - 02 Mar 2008 04:53 GMT
How does asp.net know to set the Page.IsPostBack property exactly???

Would somebody detail this, thanks very much...
Madhur - 02 Mar 2008 10:01 GMT
> How does asp.net know to set the Page.IsPostBack property exactly???
>
> Would somebody detail this, thanks very much...

When the page is submitted, the ID of control is also sent which caused the
postback.
And because of this ID, ASP.NET is able to execute the event handler for
that control.

I think thats how ASP.NEt differentiates between the new request and
postback.

Signature

Madhur

http://madhurahuja.blogspot.com

Michael Nemtsev [MVP] - 02 Mar 2008 13:31 GMT
Hello Madhur,

Each server control implements IPostBackEventHandler interface, where the
RaisePostBackEvent is used.
IsPostBack return true if PostBack event was raised.

You can find more discussion there http://forums.asp.net/t/1198506.aspx

---
WBR,
Michael  Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour 

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

M> how ASP.NEt differentiates between the new request and postback
M>
Madhur - 03 Mar 2008 07:17 GMT
> Hello Madhur,
>
[quoted text clipped - 13 lines]
>
>> how ASP.NEt differentiates between the new request and postback

Thanks Michael

Signature

Madhur

http://madhurahuja.blogspot.com

Sergey Zyuzin - 03 Mar 2008 09:37 GMT
> How does asp.net know to set the Page.IsPostBack property exactly???
>
> Would somebody detail this, thanks very much...

Well, looking at Page class with Reflector it seems there are few
rules that affect the flag. For the most part its value depends on
whether request has  __VIEWSTATE or __EVENTTARGET parameters.

Thanks,
Sergey

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.