html - Classic ASP - Retrieve Session variable in drop down -


I have a little issue with which I am stuck and the best way to solve this issue is not understood. . I have a drop down list, which is populated from a SQL result set. When the user makes an income on the next page, it keeps the "shortcode" in the session used in the next few steps, but when the user goes back to the new test page, I need a drop down menu. Which was earlier created through the session) How do I get it?

Here is my ASP code:

  operator  & Lt; / Optgroup & gt; & Lt; / Select & gt;   

"Shortcode" is only the initial of the user who eventually returns to his full name to be included in SQL. The "shortcode" is stored in the session ("operator")

There is a need to add the selected attribute to that option that should be selected. How it is:

  No response to rs. Written ("& lt; option value =" & amp; amp; rs ("shortcode")) if rs ("shortcode") & amp; ; "" = Session ("operator") then response.write ("selected") end if response.write ("& gt;" & amp; amp; RS ("user name") & amp; "& lt; / option & Gt; ") rsmovenext Wend    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -