kdeutsch
asked on
Get values from request querystring
I am trying to get the values of my query string so that I can repopulate the page with the information that I originally saved from the page. This query string was passed by Javascript so I don't know how to get the values out of it. the first is my query string, the first value is the date, then the (tf=36) and then the Uic=PUPAA. I need to get these 3 values to pass to an sql statement to pull data to repopulate my page.
http://ngmnc2-j6ops-a5/SADDotNet1/Documents/AttendanceForm.aspx?dt=24%20Jun%202008&tf=36&uic=PUPAA
This is the javascript that passed the values to the querystring to get to other page.
<script language="javascript">func tion showForm(theDate) {theTF = document.Form1.ddlTaskForc e.value; theUIC = document.Form1.DDLUIC.valu e;
window.location.replace("A ttendanceF orm.aspx?d t=" + theDate + "&tf=" + theTF + "&uic=" + theUIC);
}
</script>
http://ngmnc2-j6ops-a5/SADDotNet1/Documents/AttendanceForm.aspx?dt=24%20Jun%202008&tf=36&uic=PUPAA
This is the javascript that passed the values to the querystring to get to other page.
<script language="javascript">func
window.location.replace("A
}
</script>
in the code behind use request.querystring("tf")
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ok here is what I have so far.
Dim id As String
id = Request.QueryString("ID")
If id = "" Then
Response.Redirect("Attenda nceform.as px")
Response.End()
End If
sql = "select strUic from tblUIC where strUIC = " & id
Response.Write(sql)
Response.End()
It locks up on me at this point, I thought I needed to pas the value to the sql string some how.
Dim id As String
id = Request.QueryString("ID")
If id = "" Then
Response.Redirect("Attenda
Response.End()
End If
sql = "select strUic from tblUIC where strUIC = " & id
Response.Write(sql)
Response.End()
It locks up on me at this point, I thought I needed to pas the value to the sql string some how.