Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Get values from request querystring

Posted on 2008-06-24
3
Medium Priority
?
1,059 Views
Last Modified: 2008-07-11
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">function showForm(theDate) {theTF = document.Form1.ddlTaskForce.value; theUIC = document.Form1.DDLUIC.value;
window.location.replace("AttendanceForm.aspx?dt=" + theDate + "&tf=" + theTF + "&uic=" + theUIC);
            }                              
</script>
0
Comment
Question by:kdeutsch
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 7

Expert Comment

by:skiltz
ID: 21855160
in the code behind use request.querystring("tf")
0
 
LVL 43

Accepted Solution

by:
TimCottee earned 1500 total points
ID: 21855163
Hello kdeutsch,

In your page_load event simply assign the relevant values:

DDLUIC.Text = Request.QueryString("uic")
ddlTaskForce.SelectedValue = Request.QueryString("tf")

For example.

Regards,

TimCottee
0
 

Author Comment

by:kdeutsch
ID: 21855584
Ok here is what I have so far.

 Dim id As String

        id = Request.QueryString("ID")

        If id = "" Then
            Response.Redirect("Attendanceform.aspx")
            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.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question