Click here to Skip to main content
15,909,030 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Question[Message Deleted] Pin
Subin Alex25-May-09 19:04
Subin Alex25-May-09 19:04 
AnswerRe: How to change the colour of the MenuItem which is generated dynamically? Pin
Baran M25-May-09 19:25
Baran M25-May-09 19:25 
AnswerRe: How to change the colour of the MenuItem which is generated dynamically? Pin
Ramesh Swaminathan25-May-09 19:27
Ramesh Swaminathan25-May-09 19:27 
GeneralRe: How to change the colour of the MenuItem which is generated dynamically? Pin
Baran M25-May-09 19:44
Baran M25-May-09 19:44 
GeneralRe: How to change the colour of the MenuItem which is generated dynamically? Pin
Ramesh Swaminathan25-May-09 20:49
Ramesh Swaminathan25-May-09 20:49 
QuestionJavascript and Obfuscator Pin
ycorre25-May-09 17:29
ycorre25-May-09 17:29 
AnswerRe: Javascript and Obfuscator Pin
N a v a n e e t h25-May-09 17:43
N a v a n e e t h25-May-09 17:43 
QuestionSetting ValidationExpression clientSide Pin
dwolver25-May-09 14:29
dwolver25-May-09 14:29 
I have web page that I want to switch the validationExpression for control based on a checkBox.
I'm trying the code in the script portion of the web page.
When I submit the page and evaluate the Validation Control on the Page_Load during Postback the control has the same expression as defined in the .aspx file body, eg
<asp:RegularExpressionValidator ID="EmailRegexValidator"   runat="server"
   ControlToValidate="Email" ErrorMessage="Invalid Email"
   ValidationExpression=".*@.{2,}\..{2,}"> ///// Does not seem to change in postback
</asp:RegularExpressionValidator>

Any ideas on what I need to do to make this work?




      <script type="text/javascript" language="javascript">
            function InitValidators()
            {
                  // retrieve instance of our checkbox
                  var checkbox = document.getElementById('<%=enableValidatorsCheckBox.ClientID%>');
                  // enable/disable all validators on page based on checkbox state
                  ValidatorsEnabled(checkbox.checked);                 
            }

            function ValidatorsEnabled(state)
            {
                  ValidatorEnable(document.getElementById('<%=NameRequiredFieldValidator.ClientID%>'), state);
                  ValidatorEnable(document.getElementById('<%=EmailRequiredFieldValidator.ClientID%>'), state);
                  ValidatorEnable(document.getElementById('<%=EmailRegexValidator.ClientID%>'), state);

                  if (state)
                     setValidation(".*@.{2,}\..{2,}")
                  else
                     setValidation(" [0-9]{3}[*][0-9]{5}[*][0-9]{2}");
                  var s = document.getElementById("EmailRegexValidator").validationexpression;
                                   
            }

            function setValidation(someVal) {
               document.getElementById("EmailRegexValidator").validationexpression = someVal;
           
            }


      </script>
AnswerRe: Setting ValidationExpression clientSide Pin
N a v a n e e t h25-May-09 17:07
N a v a n e e t h25-May-09 17:07 
QuestionCurrent best practices to querying sql server in an asp.net website? Pin
Goalie3525-May-09 9:11
Goalie3525-May-09 9:11 
AnswerRe: Current best practices to querying sql server in an asp.net website? Pin
N a v a n e e t h25-May-09 16:45
N a v a n e e t h25-May-09 16:45 
Questionuse fax in asp.net Pin
MAHDIEHES25-May-09 8:49
MAHDIEHES25-May-09 8:49 
AnswerRe: use fax in asp.net Pin
Goalie3525-May-09 9:18
Goalie3525-May-09 9:18 
AnswerRe: use fax in asp.net Pin
Christian Graus25-May-09 18:12
protectorChristian Graus25-May-09 18:12 
QuestionHow to properly configure DNS and domain mapping to IP? Pin
baburman25-May-09 7:22
baburman25-May-09 7:22 
AnswerRe: How to properly configure DNS and domain mapping to IP? Pin
Matt Cavanagh25-May-09 20:25
Matt Cavanagh25-May-09 20:25 
GeneralRe: How to properly configure DNS and domain mapping to IP? Pin
baburman26-May-09 23:58
baburman26-May-09 23:58 
GeneralRe: How to properly configure DNS and domain mapping to IP? Pin
Matt Cavanagh27-May-09 6:16
Matt Cavanagh27-May-09 6:16 
AnswerRe: How to properly configure DNS and domain mapping to IP? Pin
Perry Holman25-May-09 21:48
Perry Holman25-May-09 21:48 
GeneralRe: How to properly configure DNS and domain mapping to IP? Pin
baburman26-May-09 5:24
baburman26-May-09 5:24 
QuestionProblem with web application Pin
sarang_k25-May-09 6:00
sarang_k25-May-09 6:00 
AnswerRe: Problem with web application Pin
Baran M25-May-09 7:17
Baran M25-May-09 7:17 
QuestionAnti fraud voting system w/o login. Pin
Mohammad A Gdeisat25-May-09 5:26
Mohammad A Gdeisat25-May-09 5:26 
AnswerRe: Anti fraud voting system w/o login. Pin
N a v a n e e t h25-May-09 16:38
N a v a n e e t h25-May-09 16:38 
GeneralRe: Anti fraud voting system w/o login. Pin
Mohammad A Gdeisat25-May-09 16:41
Mohammad A Gdeisat25-May-09 16:41 

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

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.