LinkButton in ListView in UpdatePanel causes full postback

前端 未结 5 982
自闭症患者
自闭症患者 2020-12-08 10:00

I have a LinkButton in a ListView in an UpdatePanel. I would like the button (well, any of them) to cause a partial postback, but they are causing a full page postback.

5条回答
  •  佛祖请我去吃肉
    2020-12-08 10:58

    The ClientIDMode setting in ASP.NET 4 lets you specify how ASP.NET generates the id attribute for HTML elements.

    In previous versions of ASP.NET (i.e. pre 4), the default behavior was equivalent to the AutoID setting of ClientIDMode. However, the default setting is now Predictable.

    Read Microsoft Article

    AutoId is required for this because of the way the script manager expects the HTML controls to be generated in previous versions of .NET.

提交回复
热议问题