Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
275
Need to get selected value for WebDropDown from Request.Form collection
posted

Hello,

I realize this is not the recommended way to do things, but please bear with me.  I need to know how to inspect the Request.Form values and parse out the value that has been submitted in a WebDropDown control.  I see that Request.Form.Item("myWDD_clientState") has this value:

|0|j&tilda;-1||[[null,[],null],[{"0":[7,0],"1":[41,0],"2":[23,"James%20Harrison"]},[{"1":[0,9,1],"2":[0,7,1],"3":[0,0,81]}]],null]

I can see the text value, which was "James Harrison".  But there should be a value of "3" in there that I can parse out using JSON or some other method.  There is a "3" as the final parameter of that JSON object, so maybe that's it?

And I recognize that parsing this data is not supported in terms of future compatibility.  It is difficult to explain why we need to do this.  Basically it is because our in-house developed application development framework is extremely dynamic and mostly follows the pattern of ASP.NET events, but not 100%.  When we save a record to the database we process the form submission before rendering the controls onto the page object.  So at this point in processing we do not have the page object constructed with controls that have filled themselves with values.  So we need to get it from the Response.Form collection.

I look forward to your reply.  Thanks!