How can i send Usename and password from Login.HTML Page to default.aspx from HTML, and how can i read username and password in default.aspx(c#) page sanded by Login.html page.
Asked
Active
Viewed 1,267 times
-1
-
1This is a very basic question have you searched on google? go to the question http://stackoverflow.com/questions/209301/how-to-post-a-form-from-html-to-aspx-page – Shahbaz Feb 14 '14 at 12:48
1 Answers
0
Login.htm
<form action="Default.aspx">
user name: <input type="text" id="txtusername" name="txtusername" />
Password: <input type="password" id="txtpass" name="txtpass" />
<input type="submit" value="Login" />
</form>
Default.aspx.cs
protected void Page_Load(object sender, EventArgs e)
{
if(!Page.IsPostback)
{
string username = Request["txtusername"];
string password = Request["txtpass"];
// remaing code
}
}

Irfan TahirKheli
- 3,652
- 1
- 22
- 36