473,800 Members | 2,497 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Retrieve POST data from an HTML Form in asp.net

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
2 7853

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
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("f ield_1"))
End Sub
</script>

It was simplier then i thought. Thanks again!
Daniele

Sep 17 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3187
by: logik3x | last post by:
I'm developping a program to automate the submisson of grades to a website called omnivox.ca (http://brebeuf.omnivox.ca). My problem is that I can't get the login working. I get the cookie right and the post data is corect. But when I sniff the http packet it contains not post data and he response is not the same. Here are the sniffed post packets. POST from IE6 (Request-Line):POST /Estd/Default.aspx?C=BRE&E=P&L=FRA&Ref=20051122161245...
2
1488
tolkienarda
by: tolkienarda | last post by:
hi all i am sending data from an html form to an update page but since this is still my first script i don't know this step. i've read some stuff on php.net and echoecho but still can't figure how to get my post data being sent my form sends: two textareas one text input and two selects i know i need the $_POST command but how do i get my variables from the new page thanks for any help here is the form if you need it
6
1820
by: Carlo | last post by:
I have an html form that posts onto an asp.net page (vs2005). The form header is as follows: <form action="thankyou.aspx" method="post">. In a table i have the fields <td><input id="email" type="text" runat="server" /></tdand a submit button. In the asp.net page, how do i get the values of the posted form ? Thanks
10
1794
by: preetksaini | last post by:
hi, i want to post an html form on the click of a button to an ajax function,this ajax function will pass this fom object to a php page,where i want to fetch all the values entered by user in the form. can anyone help me to do this,as im not able to pass the whole form and access the form values in php page. thank you.
1
2236
by: JohnathanKong | last post by:
Hello, I hope this is the right place to post, but anyways, here goes. I current have a forum, snitz, in place, but am having an IE specific problem. Basically what happens is, I have a page that drops a cookie which logs in the user. This all works fine, but once the cookie is dropped ALL post method data from forms become empty. Get works, and if I post data to a different site it works, so the break down is reading the data from the post....
8
1421
rrocket
by: rrocket | last post by:
I have been looking all over trying to find a simple example of how this is done... Basically I want to send info from a form to another website API via XML and get the information they send back to me. If anyone has any examples or knows of any sites that explain it clearly please let me know. I am trying to write it in C# .NET 2.0...
2
1939
by: eselk2003 | last post by:
I have a Windows application that uses the Windows Internet (wininet) API to post a few lines of text to an ASP.NET page that I'm writing. I know how to process form data in ASP.NET, but not sure how to process simple lines of text. I'm a C++ Win32 programmer and have lots to learn about .NET, and VB.NET. I imagine I need to use Request.BinaryRead, or Request.InputStream, and I'm sure I could figure out some way to kludge something...
9
1819
by: phillx | last post by:
I am uncertain of the exact terminology and I am extremely hopeful that some will be able to assist me. 8) Below is a sample of the code - what I need is to collect the results of the selection. In this case a user selects a city/cities (in Texas) - This will be added to their favorites list. <head> <title>Select Cities</title> <script language="javascript"> function addOption(selectbox,text,value ) {
2
2811
by: fydwell | last post by:
I am just a newbie for PHP. though I tried times to solve this, it is still showing "abnormal visit or too much frequent visit". the normal browser steps as: browse http://qyxy.baic.gov.cn/zhcx/zhcxAction!list.dhtml?op=cx . input 110000450124316 in one of the blanks, then click lookup. the browser will show additional link as lookup result below the same page. what I need is the result link as:...
0
9691
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9551
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10279
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10255
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6815
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5473
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5607
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4150
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3765
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.