Click here to Skip to main content
15,919,931 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: How to create HyperLink for field in Crystal CrossTab report ? Pin
Member 204565326-Feb-11 9:22
Member 204565326-Feb-11 9:22 
QuestionInsert into table Pin
hahii1-Jun-09 10:14
hahii1-Jun-09 10:14 
AnswerRe: Insert into table Pin
David Mujica1-Jun-09 10:20
David Mujica1-Jun-09 10:20 
Questionmembership and Roles Pin
hahii1-Jun-09 9:02
hahii1-Jun-09 9:02 
QuestionHow to pass & retrieve gridview as session variable. Pin
ashutosh_karna1-Jun-09 8:18
ashutosh_karna1-Jun-09 8:18 
AnswerRe: How to pass & retrieve gridview as session variable. Pin
Ibrahim Bello1-Jun-09 9:11
Ibrahim Bello1-Jun-09 9:11 
GeneralRe: How to pass & retrieve gridview as session variable. Pin
Not Active1-Jun-09 9:32
mentorNot Active1-Jun-09 9:32 
AnswerRe: How to pass & retrieve gridview as session variable. Pin
Not Active1-Jun-09 9:25
mentorNot Active1-Jun-09 9:25 
GeneralRe: How to pass & retrieve gridview as session variable. Pin
Ibrahim Bello1-Jun-09 9:29
Ibrahim Bello1-Jun-09 9:29 
GeneralRe: How to pass & retrieve gridview as session variable. Pin
Not Active1-Jun-09 9:36
mentorNot Active1-Jun-09 9:36 
GeneralRe: How to pass & retrieve gridview as session variable. Pin
Ibrahim Bello1-Jun-09 21:36
Ibrahim Bello1-Jun-09 21:36 
QuestionGridView Editing with VB.NET Pin
MacIntyre1-Jun-09 6:47
MacIntyre1-Jun-09 6:47 
AnswerRe: GridView Editing with VB.NET Pin
ToddHileHoffer1-Jun-09 10:28
ToddHileHoffer1-Jun-09 10:28 
GeneralRe: GridView Editing with VB.NET Pin
MacIntyre1-Jun-09 11:03
MacIntyre1-Jun-09 11:03 
GeneralRe: GridView Editing with VB.NET Pin
ToddHileHoffer1-Jun-09 12:21
ToddHileHoffer1-Jun-09 12:21 
GeneralRe: GridView Editing with VB.NET Pin
MacIntyre1-Jun-09 12:57
MacIntyre1-Jun-09 12:57 
QuestionHow to create forum in asp.net Pin
Saiyed Alam1-Jun-09 6:11
Saiyed Alam1-Jun-09 6:11 
AnswerRe: How to create forum in asp.net Pin
Christian Graus1-Jun-09 11:32
protectorChristian Graus1-Jun-09 11:32 
Questionsql query Pin
jainiraj1-Jun-09 6:06
jainiraj1-Jun-09 6:06 
AnswerRe: sql query Pin
Not Active1-Jun-09 7:31
mentorNot Active1-Jun-09 7:31 
QuestionPassing an ID to an external .js file Pin
dwolver1-Jun-09 4:44
dwolver1-Jun-09 4:44 
Want to do clienside validation on a textbox control. This textbox can represent two data types depending on an associtate checkbox. So if checkbox is checked the validation should do (a) and if off do (b)

In the javascript funtion below I do a getElementForID("chkBox1")
However if I want this to be a global routine I don't know what the checkBox would be
and preferably I'd like to pass an Integer so I could do multiple validations on this control or others. The "Sender" parameter seems to be my textbox, So question is how do I setup the ClientValidationFuntion property of the validator to pass an integer?  

My custom validator is setup like this

<asp:CustomValidator ID="lsdCustomVal" ControlToValidate="txtBox1" runat="server"
                     ClientValidationFunction= "validateLSDControl"></asp:CustomValidator>


in my external js file I have >>

function validateLSDControl( sender, args)
{
      var expr1 = "[0-9][0-9]-[0-9][0-9]-[0-9][0-9][0-9]";
      var expr2 = "[a-z]-[0-9][0-9][0-9]-[A-Z]/[0-9][0-9]";
      var x = document.getElementById(sender.controltovalidate);
      var chkbox = document.getElementById("chkBox1");
      var smsg = "";
      if (chkbox.checked) {
            var patt1 = new RegExp(expr, "g");
            smsg = "expr1 Invalid";
      }
      else {
            var patt1 = new RegExp(nts, "g");
            smsg = "expr2 Invalid";
      }
           
      var result = false;
      if (x != null) {
            var s = x.value;
            if (s.match(patt1))
            {
//                  alert("it worked");
                  result = true;                 
            }              
            else
                  alert(smsg);

      }
      args.isValid = result;
}
AnswerRe: Passing an ID to an external .js file Pin
RajeevKumarSharma1-Jun-09 23:19
RajeevKumarSharma1-Jun-09 23:19 
QuestionGridview in ASP.Net with C# [modified] Pin
mahichandu1-Jun-09 4:18
mahichandu1-Jun-09 4:18 
AnswerRe: Gridview in ASP.Net with C# Pin
Ibrahim Bello1-Jun-09 9:24
Ibrahim Bello1-Jun-09 9:24 
QuestionRe: Gridview in ASP.Net with C# Pin
mahichandu1-Jun-09 9:40
mahichandu1-Jun-09 9:40 

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.