开发者

In ASP.NET, how does disabling the ViewState of a databound control affect the event handling of its children controls?

开发者 https://www.devze.com 2023-02-08 20:31 出处:网络
I have a ListView control and in the LayoutTemplate I have Previous and Next paging buttons. On clicking the buttons, a PageButton_Click event handler in the code behind file is called to do the pagin

I have a ListView control and in the LayoutTemplate I have Previous and Next paging buttons. On clicking the buttons, a PageButton_Click event handler in the code behind file is called to do the paging. It works fine, but if I s开发者_JS百科witch off the ViewState of the ListView, clicking the buttons would not be able to call the event handler in the code behind. What is happening here?


all the server controls events are stored in viewstate. if you want to off the viewstate then not any server control work. if you want to off the viewstate then implemented the logic using javascript or jquery.

0

精彩评论

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

关注公众号