I am using AddStringWithValue method in ASP.NET using C#
My HTML code is
<form class="login-modal-content animate" action="">
<asp:Login ID = "Login" runat = "server" OnAuthenticate="ValidateUser"></asp:Login>
<div class="input">
<div>
<input type="text" id="email" style="margin:8px 2px 5px 2px;" placeholder="Email"/>
</div>
<div>
<input type="password" id="password" style="margin:5px 2px 8px 2px;" placeholder="**********"/>
</div>
</div>
<button type="submit" style="display:none"></button>
<f style="padding-left: 4px">Not yet registered? <f style="color:rgb(176,224,230); cursor:pointer" onclick="document.getElementById('Sign_Up_Form').style.display='block';document.getElementById('Login_Form').style.display='none';">Sign Up</f></f>
</form>
My C# code for the method is:
cmd.Parameters.AddWithValue("@email", Login.email);
cmd.Parameters.AddWithValue("@password", Login.password);
The problem is, it is giving red underline under email and password. Shouldn't we identify them with Id? Please tell me how to identify them..
I am sorry, I still don't know how to format my codes here..
edit:
The error message is
Compiler Error Message: CS1061: 'System.Web.UI.WebControls.Login' does not contain a definition for 'email' and no extension method 'email' accepting a first argument of type 'System.Web.UI.WebControls.Login' could be found (are you missing a using directive or an assembly reference?)
The HTML is in masterpage.master and c# code is in masterpage.master.cs