07-09-2004, 11:43 PM | #2 (permalink) |
Upright
|
not unless you're doing J#.NET (or whatever cockamamy thing MS has dreamed up to "take place" of Java for .NET). Postbacks are a completely proprietary function of ASP.NET languages.
Oh, Just so you know, Postbacks work through an actual form being submitted, and the server automatically checking to see that it was a special type of form being submitted that triggers the "postback" |
07-13-2004, 09:51 AM | #4 (permalink) |
Banned from being Banned
Location: Donkey
|
postbacks inform the server that an event took place.
for example, the code on a drop down menu will have a "__doPostBack" javascript attached to it on any of it's events (most common: onChange). When the JS is called, the element's name is passed as an argument to a function which submits a form back to the server that triggers event handler code. When the server is notified, that control's event handler fires.. so in your c# code, "cboBlah_OnChange" will fire. You can then add whatever code you need. PostBacks, combined with ViewState, are awesome. Makes it very easy to change certain parts of your HTML without having to redraw the whole thing or execute unnecessary code. It's kinda hard to explain, and it really didn't make much sense to me until I got very deep into user control creation. It's very handy.
__________________
I love lamp. Last edited by Stompy; 07-13-2004 at 09:53 AM.. |
Tags |
jsp, postbacks |
|
|