I want to pass ASP returned values via hidden form fields...
Here is a simpler demo of my what I am trying to do....
Page containg asp values in hidden fields of a form:
(input.asp)
<html>
<body>
<form method = "post" action="ad.asp">
<input type = "hidden" value = "adski" name = "ad1">
<input type = "hidden" value = ""<%= WeekDayName(Weekday(Date)) %>"" name="ad2">
<input type = "submit" value="submit" name = "submit">
</body>
</html>
Output page, showing passed ASP values:
(ad.asp)
<%
Option Explicit
response.buffer = true
%>
<html>
<body>
<%
' declare all variable names
dim ad1
dim ad2
ad1 = request.form("ad1")
ad2 = request.form("ad2")
%>
this is ad2:<br>
<%response.write ad1%>
<br>
<br>
this is ad1:<br>
<%response.write ad2%>
</body>
</html>
But on ad.asp i only pass the text value, not the asp value of the second hidden field.!!!!!
How can I do it'????
Any ideas?
muchos gracias for your help!
DoH! sussed it out!! too many """"""
Doh!
Ciao!
hi
here is u'r code
---------------------------------------------
<input type = "hidden" value = ""<%= WeekDayName(Weekday(Date)) %>"" name="ad2">
---------------------------------------------
the right code is
=================
<%
dim week_dy
weel_dy=WeekDayName(Weekday(Date))
%>
<input type = "hidden" value = "<%=week_dy%>" name="ad2">
=================
u just have to copy the above code and paste in place of u'r 2nd hidden element.
nothing else and u got the right result on ad.asp page
feel free to ask any other query.....
bye
Sur :cool:
Adam, I am not sure if the last reply answered your question, but what exactly r u trying to do?!
I noticed that you used double doubl quotes "" <%=Wee....%>"".
If you could explain more on what do u mean u r getting the text not the asp output.
if what you ment was the output of the ad.asp page be like
as is
===============
adski
<%=WeekDayName(Weekday(Date)) %>
===============
Then in the input
<input type = "hidden" value = "<%= WeekDayName(Weekday(Date)) %>" name="ad2">