开发者

SelectedValue after updating dropdown with json/webmethod

I have a dropdown list to which items are added via a json/webmethod call - an "add new item to the box" 开发者_JAVA技巧type of solution. Now - this problem is, that if I select the new value, the _comobox1.SelectedValue is empty.

The controls are validated via a RequiredFieldValdiator so I am pretty sure that a value is indeed selected, and posted.

If I look at _comobox1.Items i even see the new item, with the correct value - any thoughts?


You must add this value to a hidden field and read it upon post. This is by design (and for security reasons) in asp.net web forms. I'm assuming you also turned off event validation just to enable this.

See: http://social.msdn.microsoft.com/Forums/en/sharepointdevelopment/thread/05a3e4bc-b39e-4165-b04f-c3af9332b578

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜