asp.net page lifecycle [closed]
How to get post back data in page pre-init stage? Can I do that?
Use the
Request[key]
dictionary directly
EDIT: But, as Oded said, no ASP.NET "services". You get the raw post back data and have to do everything self.
EDIT2:
var val = Request["NAME_OF_MY_HTML_INPUT_ELEMENT"];
not testes, but should also work:
var val = Request[myHiddenFieldControl.UniqueID];
No, you can't.
Post back data is not available at that point as can be seen here.
If the request is a postback, the values of the controls have not yet been restored from view state.
精彩评论