Click here to Skip to main content
15,937,429 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have designed a page in html which contain form. now i want to retrieve that form data from that html page and i want store that data to microsoft-sql database using aspx page. Is it possible to access a data from that html page to aspx page. I also Want to place a textarea (one of form element) in aspx page is it possible
Posted
Updated 13-Aug-10 23:23pm
v3

See, I think you are coming from tech like Servlets, ASP somewhere, where the form data is available from an html page only with form action.

In asp.net you can get form data during postback. It has superior Server side controls that can track even viewstates. I think it is better to learn basics of Asp.net first so that you know how easy is to handle these in ASP.NET.

Other than that, in your situation, it is very easy to get form data. Just post the page, the same way you do for other programming language using form action, and post it to your own HttpHandler (one interfaced from IHttpHanler interface)

You will get all the form data from HttpContext.Current.Request.Form
:)
 
Share this answer
 
Comments
narikkumar 26-Aug-10 7:02am    
Reason for my vote of 5
it's good
You can't get the form data from a page that has already been posted, from another page. The closest you can get is cross page postback using two ASPX pages. Hard to say more based on what you've told us.
 
Share this answer
 
You don't need to have a ASPX page in between. Use a simple class that would pass on the form data from HTML and insert it into SQL DB.

Either use HTML or ASPX to get data and then post it to DB.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900