Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

send variable value to other page

Status
Not open for further replies.

castella

Technical User
Apr 7, 2006
3
GB
This is my code

<% CUser= request(&quot;CUser&quot;) %>
<% Sistemas= request(&quot;Sistemas&quot;) %>
<%
Set Conn = Server.CreateObject(&quot;ADODB.Connection&quot;)
Conn.Open &quot;DSN=Requisicion;uid=sa;pwd=&quot;

sSQL=&quot;Select * from T_Inf_Personal where Username = '&quot; &CUser&&quot;' &quot;

set RS = Conn.Execute(sSQL)

If not RS.EOF then
If Sistemas = &quot;&quot; then
Response.Redirect(&quot;Cuentas1.asp&quot;)
Else
If Sistemas = &quot;Windows&quot; then
Response.Redirect(&quot;Cuentas2.asp&quot;)
End If
End If
End If
Conn.Close
%>

I want to send CUser and Sistemas to the page CuentasX
what can I do?
 
Use Session variables or use the querystring.
Code:
'Using Session variables.
Session(&quot;CUser&quot;)= CUser
Session(&quot;Sistemas&quot;) = Sistemas

'Using the querystring.

Dim qStr
qStr = &quot;&quot;Cuentas1.asp?CUser=&quot; & CUser & &quot;&Sistemas=&quot; & Sistemas
Response.Redirect(qStr)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top