dpicco
asked on
passing values from asp to asp.net through an html form
Hello experts,
I have some code like this
How do I access those hidden values inside my user_maint.aspx page? This is not working.
Then how do I pass those values back to asp? There is probably a much better way to do this. Thanks.
I have some code like this
response.write "<td><form method=post action=/adhoc/aspnet/user_maint.aspx name=frm"&cnt&">"
response.write "<input type=hidden value="&oRS("network_account")&" name=network_account> "
response.write "<input type=hidden value="&request.form("lname")&" name=lname> "
response.write "<input type=hidden value="&oRS("employee_id")&" name=employee_id> "
response.Write "<a href=javascript:document.frm"&cnt&".submit();><b>"&oRS("fullname")&"</b></a></form></td> "
How do I access those hidden values inside my user_maint.aspx page? This is not working.
<asp:TextBox ID="TextBox1" runat="server" Text=request.form("employee_id")></asp:TextBox>
Then how do I pass those values back to asp? There is probably a much better way to do this. Thanks.
You need to make sure there is a value (other than blank) for that hidden element. Elements without values are not sent when the form is submitted. That's standard HTML procedure.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I was able to do this in Page_Load
Session["employee_id"] = Request.Form["employee_id" ];
Is there a way to use the request.form just in the the aspx page without using the code behind?
Thanks.
Session["employee_id"] = Request.Form["employee_id"
Is there a way to use the request.form just in the the aspx page without using the code behind?
Thanks.