Click here to Skip to main content
       

ASP.NET

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
QuestionCan a Compare validator fire when either of two controls changes?memberdarookie9918 Feb '13 - 17:13 
From what I have read, a Compare validator only fires when the ControlToValidate changes (not the ControlToCompare). How can I get a validator that fires when either of two controls change?
AnswerRe: Can a Compare validator fire when either of two controls changes?mentorBrij18 Feb '13 - 19:09 
You question is looking Good. You can go for custom validator or try using two compare validator for both the controls.
Cheers!!
Brij
Microsoft MVP ASP.NET/IIS
Visit my Blog: http://brijbhushan.net

GeneralRe: Can a Compare validator fire when either of two controls changes?memberdarookie9919 Feb '13 - 13:51 
Thanks for the answer. I ended up programing it with two custom validators. When I entered the one I would clear the message (if there was one) of the other.
AnswerRe: Can a Compare validator fire when either of two controls changes?memberryanb3119 Feb '13 - 2:32 
Yes, you'll have to use 2.
There are only 10 types of people in the world, those who understand binary and those who don't.

AnswerRe: Can a Compare validator fire when either of two controls changes?mentorKeith Barrow19 Feb '13 - 4:07 
Yes, that is one of it's intended uses.
 
you need to set the ControlToValidate and ControlToCompare to the ID of the controls you want to compare. There is documentation on it here[^], the main things you need to set are the Type property (seeh here[^]) and the Operator property (see here[^]) as well as the various display stuffm such as the error message.
 
It is possible to have more complex validation of controls, but you need to hand-roll your own JavaScript and Code-behind.
 
[Edit]
Totally misread your question, sorry! I think it validates of either is changed, but you've sown the seed of doubt in my mind! It wouldn't make sense to validate on only one control...

Questionmultilanguage applicationmemberMember 870181318 Feb '13 - 7:39 
now i am developing a web application which is in english.if i want to make that application as global that is multilanguage supported application .how can i do that ...for ex
name textbox control
district dropdownlist control
city dropdownlist control
etc....
in hindi
naam(it must be in hindi letters)
like that...
in chinese language
....
in french language
 
how can i do that,except images text must be in corresponding languages...including tool tips...
AnswerRe: multilanguage applicationmvpSandeep Mewara18 Feb '13 - 7:58 
You are talking of localization and globalization of your website.
 
Look here:
Globalization and localization demystified in ASP.NET 2.0[^]
ASP.NET Localization (Quick Reference)[^]
Using Localization in ASP.NET[^]
An Easy Introduction to Localization in ASP.NET 2.0[^]
MSDN: Globalization and Localization[^]
 
In case needed, look here at CP itself[^] for more articles
Sandeep Mewara
Microsoft ASP.NET MVP 2012 & 2013

[My Blog]: Sandeep Mewara's Tech Journal!
[My Latest Article]: HTML5 Quick Start Web Application

GeneralRe: multilanguage applicationmemberMember 870181325 Feb '13 - 21:59 
Globalization and localization demystified in ASP.NET 2.0[^]
i followed the above link & downloaded source code..& executed it...but i am getting the following error
Error	12	The type or namespace name 'BasePage' could not be found (are you missing a using directive or an assembly reference?)	C:\Users\user\Desktop\WebApplication3\WebApplication3\Default.aspx.cs	12	33	WebApplication3
this error is occuring on default.aspx.cs page & the line is
public partial class _Default : BasePage
what should i do to overcome the above issue..
pls help me...
GeneralRe: multilanguage applicationmvpSandeep Mewara25 Feb '13 - 23:24 
Sounds like there should be a BasePage in App_Code folder. Check the download attachment.
Sandeep Mewara
Microsoft ASP.NET MVP 2012 & 2013

[My Blog]: Sandeep Mewara's Tech Journal!
[My Latest Article]: HTML5 Quick Start Web Application

GeneralRe: multilanguage applicationmemberMember 870181326 Feb '13 - 1:44 
in App_Code folder BasePage.cs is there.i have downloaded everything.eventhen it is showing error.can u check it once pls....it is more helpful for me....

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web03 | 2.6.130523.1 | Last Updated 25 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid