please help, I have an asp page with a list box and 2 buttons on it when i click the first button the selected value from the listbox is passed to the relevant page, but when i click the second button it does not pass the selected value.
Here is the code
<tr class="Body1">
<td>
<div align="center">
<% If Not rstUserList.EOF Then %>
<form method="POST"action="viewmachines1.asp">
<select name="usersid" size="5">
<% Do While Not rstUserList.EOF
If intcounter = 1 Then
Response.Write("<option value=""" & rstUserList("sid" & """ selected>"
intCounter = intCounter + 1
Else
Response.Write("<option value=""" & rstUserList("sid" & """>"
End If
%>
<% = rstUserList("uid" %> (<% = rstUserList("fname" %>)
</option>
<%
rstUserList.MoveNext
Loop
%>
</select>
<p><input type="submit" value="<%=lang(cnnDB, "EditUserMachine"%>"></p>
</form>
<% End If %>
<form name="addmachine" method="POST" action="addmachine.asp">
<p><input type="submit" value="<%=lang(cnnDB, "AddNewMachine"%>"></p>
</div>
</td>
</tr>
Here is the code
<tr class="Body1">
<td>
<div align="center">
<% If Not rstUserList.EOF Then %>
<form method="POST"action="viewmachines1.asp">
<select name="usersid" size="5">
<% Do While Not rstUserList.EOF
If intcounter = 1 Then
Response.Write("<option value=""" & rstUserList("sid" & """ selected>"
intCounter = intCounter + 1
Else
Response.Write("<option value=""" & rstUserList("sid" & """>"
End If
%>
<% = rstUserList("uid" %> (<% = rstUserList("fname" %>)
</option>
<%
rstUserList.MoveNext
Loop
%>
</select>
<p><input type="submit" value="<%=lang(cnnDB, "EditUserMachine"%>"></p>
</form>
<% End If %>
<form name="addmachine" method="POST" action="addmachine.asp">
<p><input type="submit" value="<%=lang(cnnDB, "AddNewMachine"%>"></p>
</div>
</td>
</tr>