显示标签为“postback”的博文。显示所有博文
显示标签为“postback”的博文。显示所有博文

2010年8月1日星期日

Hidden field lost after submit/postback (asp.net)

Using hidden field to save value. But lost them after submited.

I found if you use HTML hidden field in asp.net, you have to add "name" tag manually.

With "Name" tag, your hidden field will be submitted with value.

HIDDEN FIELD必须使用NAME属性,不然,在提交时不会上传到服务器方,也就说会丢失.
在ASP.NET时,必须注意这点.