Blog

Posts Tagged ‘postback’

ASP.Net AJAX Extensions, GetPostBackEventReference And Custom Controls

Sunday, April 27th, 2008

If you’ve a piece of code similar to this one, and try to use the control inside an UpdatePanel then you might be surprised to see that triggering that event will in fact do a complete PostBack of the page (read Refresh-like-Postback): public override void Render(HtmlTextWriter writer) { Response.Write(“Button”, Page.ClientScript.GetPostBackEventReference(this, “onclick”)); } The reason is […]