开发者

Events timings asp

开发者 https://www.devze.com 2023-01-11 20:58 出处:网络
I have a link button attached to an 开发者_C百科on click event which sets a session variable. Dependent on this variable i change content on the page.

I have a link button attached to an 开发者_C百科on click event which sets a session variable.

Dependent on this variable i change content on the page.

I define these dynamic controls in the CreateChildControls() method of the asp page.

However my problem is that the CreateChildControls() is getting called before the on click event of the link button, there for the content is changing correctly

Is there a way to make it work the other way around... so on click event fired then create child controls.

Thanks


Override the render method fixes this.

  protected override void Render(HtmlTextWriter writer)
            {

            }
0

精彩评论

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