how to pass values from html page to .aspx page

Posted by 3c150555 under Regular Expressions on 8/3/2011 | Points: 10 | Views : 12737 | Status : [Member] | Replies : 3
hello friends,
i am prabhakar i am trying to pass values from html file .aspx file.but stil i did't get this one.
can you help me some one....




thanks for advance




Responses

Posted by: SheoNarayan on: 8/3/2011 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
How you are trying?

You have two ways to do that
1. using querystring - keep a anchor tag on the html page with querystring value that will redirect to the .aspx page with that querystring value and in .aspx page you can retrieve the querystring vlaue like explained at http://www.dotnetfunda.com/articles/article1399-how-to-pass-data-from-one-page-to-another-page-using-querystring-.aspx

2. using post method - keep an html page with form element (with textbox, dropdown etc) with action="youraspxpage.aspx". Keep a submit button on the page when user click on submit button catch the form elements value using Request.Form on the .aspx page.

Hope this will help.

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

3c150555, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Hmanjarawala on: 8/3/2011 [Member] Bronze | Points: 25

Up
0
Down
Hi Prabhakar,

have u used <form> tag in html page like:
<form id="frm1" action="ur aspx page name" method="get/post"></form>
n u can use this data at ur aspx page.
if u used get method then u found ur information from Request.QueryString else Request.Param

Hope this will help u

Himanshu Manjarawala
Sr. Software Engineer@AutomationAnywhere
http://fieredotnet.wordpress.com/

3c150555, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 3/14/2012 [Member] Silver | Points: 25

Up
0
Down
Hi 50555,
For an example you can refer to:
http://forums.asp.net/t/1638526.aspx

Thanks,
Sanjay

3c150555, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response