开发者

Javascript Postback Event

I have a user control that is supposed to write a value to a hidden field every time the consuming page posts back.

Is there any way to trap the postback event at the page level? Perhaps I can wire up an event so that I 开发者_JAVA百科can run a function every time the page posts back.


You can determine within Page_Load whether an operation is the result of a postback (i'm assuming this is what you mean by "trapping the postback event at the page level".

protected void Page_Load(object sender, EventArgs e)
{
    if (Page.IsPostback)
    {
       //Your code here.

    }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜