I would never use a compare validator on any control on a login page. You
are better to store the user name and password either a) in a database
(best) or b) in the config file (not the best, but acceptable in some
instances). This requires a trip to the server and cannot be validated
client side, but there is no security hole. you can store in ViewState and
have encrypted values, but you cannot access ViewState until it goes server
side anyway.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
*************************************************
Think outside the box!
*************************************************
"Joe" <Jo*@discussions.microsoft.com> wrote in message
news:59**********************************@microsof t.com...
Hello,
I am new to asp.net. I have created a login page using dotnet. I am using
CompareValidator but noticed that when I click on View Source in the
browser
I see the value assigned to ValueToCompare property of the
CompareValidator
control.
I was wondering if there is any way I can hide that value. If not what is
the alternate way and can you explain how o implement it.
Thanks in advance for you help,
Joe
Here is what I have,
<asp:CompareValidator id="valRequiredUID"
runat="server"
ControlToValidate="txtUserID"
ValueToCompare="xyz"
Type="String"
Operator="Equal"
ErrorMessage="Please enter correct UserID."
Display="none">