form.Submit() + C Sharp = ???

M

milkyway

Hello all,

I was looking at the thread listed below. Basically, I have an HTML
page executing form.Submit() (written with Java script).

What do I need to do in order see the values in the fields of the form
on the server side. Normally (in .jsp), I would get the values on the
page and process it in a servlet. There would be tuples that would be
processed in the servlet. But I do not see how to do this in C#.

What must I do? Any help, hints or advice is greatly appreciated ;-)

TIA


Thread:
http://groups.google.com/group/micr...k=st&q=HTML+C#+submit&rnum=2#af53984555b0e63c
 
C

carion1

Request.Form or Request.QueryString collections are what you are looking for
depending on the forms method (get or post).
 
M

milkyway

Thanks for the info ;-)

But where do I put these commands? In page_load functionality of
..aspx.cs file? Is not the page_load associated with initializing the
HTML with data (i.e. I thought that you would use this area to fill in
the fields of the HTML before they are displayed).

For me, I just wish to retrieve the contents of the screen of a form.
The form is sent to the server by using form.Submit() command.
 
C

carion1

Add this to page_load:

if(IsPostBack)
{
//do whatever with the form data here
string firstName = (string) Request.Form["firstName"];
}
 

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

Top