I am working for a small IT firm and we want to send our clients surveys. I have been thrown in to the development of this without alot of expereince in ASP so I thought I would run this by the forum first off.
What I would like to do is:
1) Send the client a link ithat will direct them to a web survey and pre-fill in info such as technicial, date, and call type.
2) Have them complete the survey and hit submit to return their info (this part I know how to do!!)
Link Structure:
"http://domain.com/surveyform & date & technician &calltype"
Is this even possible to do with ASP and if so do you have any suggestions.
Thanks very much!!Sure it is very possible using asp or asp.net. What do you have questions about?
This is very possible.
Use the query string like so:
http://someplace.com/survey.aspx?Date=blah&Technician=blahblah&CallType=blahblah
That will send:
Date that has a value of blah
Technician that has a value of blahblah
CallType that has a value of blahblah
to the survey.aspx page. To access those values, you use the NameValue collection object to hold them and you get the values from the Request.QueryString() method in the page load event. Use those values to fill your controls. Make sure you check for IsPostback.
I'm trying what you say but it won't work -- where am I going wrong? It directs me to the page but the first name textbox is not filled with "testname".
My link: http://www.britec.com/survey.asp?fname=testname
My code:
<%
dim fname
fname=Request.QueryString("fname")
%>
<html>
<head>
<title>First Name</title>
</head>
<body>
<form method="get" action="survey.asp">
First Name: <input type="text" name="fname">
<br />
Last Name: <input type="text" name="lname">
<br /><br />
<input type="submit" value="Submit">
</form>
</body>
</html>
Are you using VS.Net? If you are, your first problem is you are using asp not asp.net.
I am trying to use just ASP.
Ok, you are in the wrong forum...sorry for my replies, I thought you were talking about asp.net.
The querystring principles are the same, and I think you can use the Request object the same, but you would have to verify that because I have used little asp.
Go here and ask the question:
http://www.vbforums.com/forumdisplay.php?s=&forumid=4
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment