Changing name of viewstate

风格不统一 提交于 2019-12-12 03:22:18

问题


I have two ASP.NET form living in the same page. I some problems because the hidden fields below get the same name and id.

Is there some way I can change these for one of the forms? (They are also not optimal for validation).

I need the services the viewstate provides, but perhaps I could disable it on form level, and use it at a lower (control) level?


回答1:


It's not what you want to hear, but in ASP.Net you should only have one runat="server" form per page. Otherwise this is just the first of many other problems you will encounter.



来源:https://stackoverflow.com/questions/655715/changing-name-of-viewstate

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!