How to Pass Querystring to Value and into ASP page

J

Jessica

Hi,

I am trying to pass some information to a value field then to an ASP
page.

My html page:-
<%
dim x_Day, x_Date, x_Time, x_Desc
x_Day=Request.Querystring("c_Day")
x_Date=Request.Querystring("c_Date")
x_Time=Request.Querystring("c_Time")
x_Desc=Request.Querystring("c_Description")
%>

<input type=hidden name="x_description" value=("x_Day, x_Date, x_Time,
x_Desc")>

My ASP page:-

<%= Request("x_Description") %>

It passes the whole exact content(word) in the value as, x_Day,
x_Date, x_Time, x_Desc.

Does anyone know how to resolve this?

Thanks in advanced,
Jessica
 
C

CJM

If I understand your question correctly... I think you you need to change
the input field to:

<input type=hidden name="x_description" value=("<%=x_Day & ", " & x_Date ","
& x_Time "," & x_Desc%>")>

CJM
 
R

Roland Hall

: Hi,

Hi Jessica...

: I am trying to pass some information to a value field then to an ASP page.
:
: My html page:-
: <%
: dim x_Day, x_Date, x_Time, x_Desc
: x_Day=Request.Querystring("c_Day")
: x_Date=Request.Querystring("c_Date")
: x_Time=Request.Querystring("c_Time")
: x_Desc=Request.Querystring("c_Description")
: %>
:
: <input type=hidden name="x_description" value=("x_Day, x_Date, x_Time,
: x_Desc")>

Response.Write("<input type=hidden name=""x_description"" value=""" & x_Day
& "," & x_Date & "," & x_Time & "," & x_Desc & """>")

: My ASP page:-
:
: <%= Request("x_Description") %>

If this is the result of a POSTed form then ...
<%=Request.Form("x_Description") %>

: It passes the whole exact content(word) in the value as, x_Day,
: x_Date, x_Time, x_Desc.
:
: Does anyone know how to resolve this?

You'll get the values separated by commas if that is your goal. If you need
to split them out, you can easily with the split function.
It will create an array.

In your result page:
<%
Dim arr, i
arr = split(Request.Form("x_Description"),",")

Response.Write("Day: " & arr(0))
Response.Write("Date: " & arr(1))
Response.Write("Time: " & arr(2))
Response.Write("Description: " & arr(3))

%>

HTH...

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top