here is the code
<%@ Language=VBScript %>
<%
Option Explicit
on error resume next
Response.Buffer = true
Response.Expires = -1
dim strMarket,conn, objWebData, rs, strProc , intAgent
conn = Application("cnADSCDS")
strProc = "spUSER_GetUserGroups"
set objWebData = server.CreateObject("WebData.Reader")
set rs = server.CreateObject("ADODB.recordset")
set rs = objWebData.getRS(cstr(conn),strProc,1)
strMarket = Request.Form("selAgtGroup")
if Request.QueryString("selAgtGroup") <> "" then
strMarket = Request.QueryString("selAgtGroup")
end if
%>
<HTML>
<HEAD>
<link rel="stylesheet" type="text/css" href="/css/mpstyle2.css">
<TITLE>User Maintenance</TITLE>
</HEAD>
<body>
<!--#include virtual="/include/banner.asp"-->
<table cellspacing="0" cellpadding="2" border="0" height="100%" valign="top">
<tr>
<td style="background-color: #92CCC3; width: 160px;" valign="top">
<!--#include virtual="/include/menu.asp"-->
</td>
<td valign="top" width="100%">
<form name=frmGroup id=frmGroup method=post action="MemberUpdate.asp">
<br>
<div class="Lvl1Indent" style="width=600px;height=40px;">
<table width=580>
<tr>
<td width=120>
<b>Choose a Group</b>
</td>
<td>
<%
Response.Write "<select name=selAgtGroup id=selAgtGroup>"
While not rs.EOF
Response.Write "<option "
Response.Write "value='" & rs.Fields("GroupID") & "'"
if cint(strMarket) = cint(rs.Fields("GroupID")) then
Response.Write " Selected"
end if
Response.Write ">" & rs.Fields("GroupName") & "</option>"
rs.MoveNext
Wend
Response.Write "</select>"
rs.ActiveConnection = nothing
%>
</td>
<td align=right>
<input type=submit value='Get Agents' name=btnGetAgt id=btnGetAgt>
</td>
</tr>
</table>
</div>
<BR>
</form>
<form name=frmAssignRec id=frmAssignRec method=post action="performassign.asp">
<br>
<input type=hidden value='<%=strMarket%>' name=strMarket id=strMarket>
<%Response.Write("HOLA")
Response.Write(strmarket)%>
<%If strMarket <> "" then %>
<div class="Lvl1Indent" name=divAssigned id=divAssigned style="width=600px;">
<table width=570 class="Lvl1Indent">
<tr>
<td width=285><b>Agents To Add</b></td>
<td width=285><b>Agents To Remove</b></td>
</tr>
<tr>
<td width=285 align=center>
<%
strProc = "spUSER_GetAgentsAdd '" & strMarket & "'"
set rs = objWebData.getRS(cstr(conn),strProc,1)
Response.Write "<select name=selAgtAddList id=selAgtList MULTIPLE SIZE=7>"
While not rs.EOF
Response.Write "<option "
Response.Write "value=" & rs.Fields("AgentNo")
Response.Write ">" & rs.Fields("AgentName") & "</option>"
rs.MoveNext
Wend
Response.Write "</select>"
Response.Write ("<BR>")
%>
</td>
<td width = 285 align=center>
<%
strProc = "spUSER_GetAgentsRmv '" & strMarket & "'"
set rs = objWebData.getRS(cstr(conn),strProc,1)
Response.Write "<select name=selAgtAddList id=selAgtList MULTIPLE SIZE=7>"
While not rs.EOF
Response.Write "<option "
Response.Write "value=" & rs.Fields("AgentNo")
Response.Write ">" & rs.Fields("AgentName") & "</option>"
rs.MoveNext
Wend
Response.Write "</select>"
%>
</td>
</tr>
</table>
</div>
<%End If%>
<br>
</form>
<%
set objWebData = nothing
set rs = nothing
%>
</body>
</HTML>