By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,854 Members | 1,828 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,854 IT Pros & Developers. It's quick & easy.

Retrieve POST data from an HTML Form in asp.net

P: n/a
Hello all,
I'm pretty new to asp.net, I've to do a quick port to ASP.net
I've got a problem I cannot solve: cannot find anything helpfull on
the web.
I've got an HTML form generated from a software i cannot change, so
the form must have to remain pure html.

<form id="form_1" method="POST" action="process.aspx">
<input type="text" id="field_1" value="" />
</form>

How do I have to build the process.aspx file to retrieve the field_1
input?
I tried with Request.Form['form_1'] but cannot get it, it still does
not work.

Please help me, thanks you all
Danielle

Sep 17 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a

Danielle :
<form id="form_1" method="POST" action="process.aspx">
<input type="text" id="field_1" value="" />
</form>

How do I have to build the process.aspx file to retrieve the field_1
input?
Add runat="server" attribute. Retrieve value using of field_1.Value on
server-side.
<input type="text" id="field_1" value="" runat="server"/>

Regards,
Mykola
http://marss.co.ua

Sep 17 '07 #2

P: n/a
Thanks you all!
I solved in a different way, but your suggestion were really useful.

My solution for the process.aspx page:

<%@ Page Language="VB" %>
<script runat="server">
Sub Page_Load()
Response.Write(Request.Form("field_1"))
End Sub
</script>

It was simplier then i thought. Thanks again!
Daniele

Sep 17 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.