I'm writing in asp.net. When I add runat="server"
property to my input tag, its value is null. When I remove runat="server"
it works correctly. Who knows the reason?
I want change its property from code behind, that's why I wrote runat="server"
. However, the value is null.
protected void btnSaveChanges_Click(object sender, EventArgs e)
{
string current_id = Session["Current_user"].ToString();
string a = Request.Form["newusername"];
string b = Request.Form["newpassword"];
string c = Request.Form["rewpassword"];
}
Code for control:
<input type="text" name="newusername" placeholder="Enter Username" required="required" runat="server"/>