...

View Full Version : RequiredFieldValidator the server tag is not well formed



calebandchels
12-23-2011, 09:44 PM
I am completely new to asp & C# so bare with me. I am trying to use RequiredFieldValidator and I am getting an error saying the server tag is not well formed. Here is my code....



<div id="LoginWrap">
<asp:TextBox ID="LoginTextBox" runat="server" Text="Email" />
<asp:RequiredFieldValidator ID="RequiredFieldValidatorLogin" runat="server"
ControlToValidate="LoginTextBox"
ErrorMessage="Please enter an email." . Text="!" />
<asp:TextBox ID="PasswordTextBox" runat="server" TextMode="Password" Text="Password" />
<asp:RequiredFieldValidator ID="RequiredFieldValidatorPassword" runat="server"
ControlToValidate="PasswordTextBox"
ErrorMessage="Please enter your password." . Text="!" />
</div>

alykins
12-23-2011, 10:02 PM
when do u get that error? after u try to login or something?

websitepro
12-23-2011, 11:45 PM
try getting rid of the periods for starters..


<asp:RequiredFieldValidator ID="RequiredFieldValidatorLogin" runat="server"
ControlToValidate="LoginTextBox"
ErrorMessage="Please enter an email." . Text="!" />
<asp:TextBox ID="PasswordTextBox" runat="server" TextMode="Password" Text="Password" />
<asp:RequiredFieldValidator ID="RequiredFieldValidatorPassword" runat="server"
ControlToValidate="PasswordTextBox"
ErrorMessage="Please enter your password." . Text="!" />



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum