473,387 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to hide value assigned to ValueToCompare of CompareValidator’s

Joe
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">

Nov 18 '05 #1
1 2164
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">

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: LU | last post by:
I have a datagrid for viewing and deleting. Under that I have a drop down with binded info and a button to add the select drop down item into database. 1User can view datagrid and delete info....
15
by: lawrence | last post by:
Sorry for the dumb question but I'm new to Javascript. I wrote this script hoping to animate some div blocks on a page. You can see the page here: http://www.keymedia.biz/demo.htm Can anyone...
19
by: dmiller23462 | last post by:
Hi guys....I have absolutely NO IDEA what I'm doing with Javascript but my end result is I need two text boxes to stay hidden until a particular option is selected....I've cobbled together the...
9
by: ckerns | last post by:
I want to loop thru an array of controls,(39 of them...defaults = 0). If value is null or non-numeric I want to assign the value of "0". rowString = "L411" //conrol name if (isNaN(eval...
7
by: BobRoyAce | last post by:
Let's say I have a text box on a page in which a user is to enter a monetary amount and that I want to ensure that the user enters a value greater than or equal to a certain value that will be...
1
by: asilverpeach | last post by:
Hey Guys! Found some great scripts here on this topic but have to make to changes to the code that I can't seem to figure out. First, In the following code clicking on the headers shows the...
8
by: GroZZleR | last post by:
Hey all, I have 3 classes. Let's call them Plane, Pilot and Passenger. I'm trying to restrict Passenger's access to Plane's more intimate methods, but allow Pilot to use 'em. Right now I...
10
by: k3pp0 | last post by:
Hello. Here's my example form: <form method="get" action=""> <p> <input type="radio" name="radio_example" id="radio1" value="radio1_val" /> <label for="radio1">radio button one</label> </p>
2
by: harichinna | last post by:
Hi to all, My name is hari, iam trying to delete the column value of spread sheet using c sharp, iam trying to get the value and compare, when comparing it showing some errors, can any one help...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.