
Setting Session variable to List SelectedIndex
You need to pass
document.Form1.theList.SelectedIndex
as the value of a hidden form field and then retrieve it on the server side via
Request.Form("hiddenfieldname").
That means you'll need an onsubmit handler on the client side to plug the value into the hidden
field.
--
Michael Harris
Microsoft.MVP.Scripting
--
Quote:
> I'm trying to set a session variable equal to the SelectedIndex property of
> a list at the time of form posting. I can't seem to find a way to do this.
> What I have is:
> <%
> Session("theIndex") = document.Form1.theList.SelectedIndex
> %>
> I get an error from the document object. Is there a way to do this?
> TIA,
> Andy