DropDownList in UpdatePanel

前端 未结 4 385
清歌不尽
清歌不尽 2021-01-17 15:29

In my project I have placed a dropdownlist in an updatepanel.what I wanted to do is to select a value from dropdownlist and use it in a session.

but whatever I do, it

4条回答
  •  被撕碎了的回忆
    2021-01-17 16:06

    It sounds like you're doing way more work than you need to here. Have you looked into using an ASP.NET Wizard Control? http://msdn.microsoft.com/en-us/magazine/cc163894.aspx or just Google it.

    If you still want to do it your way, you have to submit to the server (either with no autopostback + manual submit button click, or by enabling autopostback) since the Session is a server-side concept. HTTP is a stateless protocol, so the only concept of state has to be done outside of HTTP's domain. This means you're stuck storing state on the server (for instance, in the session) or, much more restrictively, on the client's computer (such as in a cookie).

提交回复
热议问题