ASP and AJAX

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • syammohan
    New Member
    • Feb 2008
    • 2

    ASP and AJAX

    In my ASP page, the list box is not pertaining the value in postback. How I can solve this using AJAX. Thanks in advance for your helo. Very urgent.
  • markrawlingson
    Recognized Expert Contributor
    • Aug 2007
    • 346

    #2
    You don't need to use AJAX to retain the value of a listbox in postback.

    Try this..

    [Code=html]

    <select name="sListBox" >
    <option value="whatever 1" <% If Request.form("s ListBox") = "whatever1" Then Response.Write "SELECTED" End If %>> whatever1 </option>
    <option value="whatever 2" <% If Request.form("s ListBox") = "whatever2" Then Response.Write "SELECTED" End If %>> whatever2 </option>
    <option value="whatever 3" <% If Request.form("s ListBox") = "whatever3" Then Response.Write "SELECTED" End If %>> whatever3 </option>
    </select>

    [/code]

    Sincerely,
    Mark

    Comment

    Working...