Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

POSTing Form Data to a Web Page 1

Status
Not open for further replies.

teamy

MIS
Mar 8, 2005
3
TR
I am currently trying to develop an application that will connect web pages (generally ASP pages) and will log in. My question is after logging in how can send form data to the host. For example there is drop-down on the page and after choosing one I must submit it with my application. Waiting for any solution. thanks...
 
Let me see if I understand you.

1) You are using c# and asp.net
2) You have a form (with an extension aspx)
3) On the form you have a dropdown list and a submit button.

How are you creating these pages. I will assume visual studio.

If all the above is correct, then when you placed the button and drop down list on the page, visual studio will have created boiler plate code in the code behind file. (which is mypage.aspx.cs)

If you double click (in development mode) on the submit button, that will take you to the default handler for the submit button.

To access the dropdown list you need something like
Code:
string myValue myDropDownList.GetSelectedItem().ToString();

Hope that helps, if Im incorrect in my assumptions, post back here and I'll try again!
If you post it, then you will be able to retrieve it on the server in teh code behind file.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top