I need to access a variable from my code behind in the .aspx page and it's not working. Here's what I'm trying:
.aspx page - RequiredFieldValidator
and here is the public field in the code behind:
When I run it, I don't get anything in the validation summary control, it just appears blank. I have tested it with the string value in the control and verified that it works so it's not a matter of the control not being setup correctly.
Any ideas?
.aspx page - RequiredFieldValidator
Code:
<asp:RequiredFieldValidator ID="rfvEditWebLogin" runat="server"
ControlToValidate="txtWebLogin" Display="None" ErrorMessage="<%= LoginRequired %>"></asp:RequiredFieldValidator>
and here is the public field in the code behind:
Code:
public string LoginRequired
{
get { return "Error, please try again"; }
}
When I run it, I don't get anything in the validation summary control, it just appears blank. I have tested it with the string value in the control and verified that it works so it's not a matter of the control not being setup correctly.
Any ideas?