.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

FieldTemplateUserControl CompareValidator - Localize DataType Check ErrorMessage

Posted By:      Posted Date: October 07, 2010    Points: 0   Category :ASP.Net

 Just a (simple) question, whom I don't have a simple answer for:

Why the CompareValidator that comes with some of the FieldTemplateUserControls cannot be localized/customized (in its error message) using the usual ValidationAttribute mechanism (ie. by exploiting an enhanced version of the DataTypeAttribute)?
That is curious (at least).

Thanks in advance.

View Complete Post

More Related Resource Links

Using a CompareValidator to check input is a valid date

The CompareValidator can do more than just compare two controls. You can also compare it against several of the main .net data types such as Date, Integer, Double and Currency.

To do this you would set Operator="DataTypeCheck" and instead of setting the ControlToCompare or ValueToCompare attributes as you normally would you use the Type="Date" (or any of the data types I have listed above).

Check All with JQuery and a Asp.Net GridView

Display a Grid on the screen with a checkbox in each row. At the bottom of the page have "Check All" button.

Typically if I need to do anything interesting I use a template column. So my GridView will look like the one below (most other columns removed for readability). The only interesting point to note is the CssClass="ApprovalCheckBox" in the CheckBox ItemTemplate.

How to Localize Windows Forms and Change the Language at Runtime

Localization is the process of customizing your application to a particular language, culture or locale. Visual Studio provides support for localizing Windows Forms with much ease. In this article, we will see how to localize windows forms and give the user the ability to change to his preferred language at runtime.
When you run a localized application, the appearance is determined by two culture values. The UICulture property is used to specify which resource files will be loaded for the form. The Culture property, on the other hand, determines how strings such as dates, numerals, and currency amounts are formatted.
Let us see the steps required to create a localized form. You can then expand this example and adopt the same approach for the rest of the forms in your project

check box control


Hi ,

I have a three check box in my web form ,i need to choose only one check box, if i choose one check box

another 2 check box automatically unchecked

can i use jquery for check box

I thought this would be simple... Trying to create a login does an ajax check before submit


I have the standard .net login control that is working.  (Still learning .net after 15yrs of classic)

What I want to do is OnButtonClick run a javascript function (to do an ajax call to the db to check if login is valid or not) and if it returns true, then submit the form normally, else don't submit. The piece that I can't figure out, is how to correctly override the default click even to hit my JS routine and then submit the form properly afterwards.

Thanks ahead of time

how to check a textbox value in jquery?



I want to perform some action when an asp.net textbox value length is greater than 1 character. And for this I wanted to know how to write this check in jquery?

I have created a check like below-

if ($('[id=txtUserInput]').val().length > 2)
{ do some work...} 

But its giving me the following error

$("[id=txtUserInput]").val() is undefined

Can anybody let me know the right way of doing this?



How to check for null/empty strings on dynamic objects?


What is the proper way to check for null or empty strings on dynamic objects? This is the only solution I've found so far:

if (admin.PasswordHash.GetType() == typeof(DBNull) || admin.PasswordHash == string.Empty)

If the field is null, the object returned is DBNull.Value, but if the field is empty string, it's return as a System.String object. This makes it impossible to do regular "admin.PasswordHash == DBNull.Value" check, as that will fail whenever the field has been set to empty string. Is my example the right (and only) way to go?

Automatically redirect to HTTPS and check if SSL is active



I've set in the web.config:

    <!-- User Authentication -->
    <authentication mode="Forms">
      <forms loginUrl="~/Page/View/Content/Login.aspx" timeout="2880" requireSSL="true" />

This works fine. If there is no ssl connection, the login form doesn't continue. But I would like to check if ssl is active (in codebehind) and, if it's possible, to automatically the user to the https page if he's currently on http. (I could do this job by manually redirect with page.response("https://url.../login.aspx"); but this is not really generic. For example if the webapp is moved to another domain it doesn't work anymore... I'm looking for something like: FormsAuthentication.RedirectWithSSL(); or so... :D)


how to check which pages of my site that my visitor visiting at the moment


 Hi all, and thanks a lot for the replies since now. I have a new question :

I prepared a simple instant messaging system for my web site and i would like to learn which visitor (registered member) is at which page of my site. 

For example : 

Uid:10000, Username:donald, NameSurname:Donald DUCK is a registered and signed in visitor.

I need the code which tells me that visitor is at which page (ie. images.aspx?imageid=143223)

Sorry for my poor english, and let me know if i should explain more clearly :)

Have a good evening...

Localize framework message from xml validation error


I need to validate an XML through XSD. I am using XMLReader (with XmlReaderSettings and 

Validation_EventHandler to do it). Depend on users preference, I would like to change the output message generated by  Validation_EventHandler in french or english.

Any idea on how to perform this?





What is CultureInfo datatype?


Hi all members!

        whats  Cultureinfo datatype.Please help to know clearly..I ve seen more Sites but i can't able to understand guys!!

        Ex:("CultureInfo culture = new CultureInfo( "hi-IN" );")Embarassed

Tools for memory error check in VS2005


Dear all,

I am going to write vs2005 program with ASP.NET and C++.

As you know that C++ will involve a lot of memory error handling.

Do you know is there any tools for checking memory error in Code Behind C++??

Team System: Check-in Notes and Policies


Learn how to add check-in notes and check-in policy support to a Word add-in, in this fifth and final installment of an ongoing discussion.

Brian A. Randell

MSDN Magazine Launch 2008

Team System: Custom check-in policies


Team Foundation Server provides APIs that let you create check-in notes (categorized string data) and custom check-in policy implementations. These features combine to give project administrators better control over the group development process.

Brian A. Randell

MSDN Magazine November 2007

Toolbox: Create Graphs, Send E-Mail, Spell-Check, and More


Turn boring data into stunning graphs, create, parse, send, and receive mail messages from code, and more.

Scott Mitchell

MSDN Magazine August 2007

Editor's Note: Check Out the Tablet PCs


Since we founded MSDN Magazine back in 1932, we've seen generation after generation of technological advances, from the early TV test transmissions of Felix the Cat dolls that made up the bulk of our coverage in the 1940s to the special 132-page bumper issue that coincided with the launch of "New" Coke in 1985.

MSDN Magazine July 2003

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend