codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  How can use ASP.NET RegularExpressionValidator for alphanumeric 10 digit input  Jig_new2.net at 15:31 on Monday, February 16, 2009
 

Hello,

I am new to ASP.NET and came accross this asp control. I have been trying to use regular validation expression which will only allow only 10 Digit alphanumeric values (i.e. only 0-9, a-z, A-Z and NO special characters are allowed). Can someone please help me with this one?

Thanks in advance for the help.

  Re: How can use ASP.NET RegularExpressionValidator for alphanumeric 10 digit input  Jig_new2.net at 15:34 on Monday, February 16, 2009
 

I am using the following - But need to restrict it for 10 digit. Please let me know how?

([0-9a-zA-Z]*\s*[\r\n]?)*

  Re: How can use ASP.NET RegularExpressionValidator for alphanumeric 10 digit input  jessonerik at 06:16 on Wednesday, October 14, 2009
 

Sorry to have confused you with that line commented out and a typo error. I didn't want to remove the "click" only from one button, what I wanted was to remove the selector completely from the chain, so only one click on any of the button will unregister the behavior as you where suggesting. I deleted the comments , now the removeDelegate is executed home owner insurance.

Thank you for noticing that, and again sorry for the confusion.

I am still not introducing any logic in the examples just testing the selectors with my Delegate implementation. I really like the CSS syntax as you have depicted it above. It is much more concise and easy to read.

If you think that YUI is setting up a polling interval to check for when an element is available to attach events to that element, you will quickly see the benefits that such a method is introducing, and not only for YUI low cost life insurance.

Did you realize that this method is fully cross-browser and that new inserted elements will acquire functionality without having to wait for it's presence and without adding new handlers to the chains ?

NWEvents already implements re-ordering of events if that was what you mean. It is also possible to apply several delegates to the same selector, keeping in mind that we use FIFO registration so the last registered function wins.

You wrote:

If a new text input is added to the page using the jQuery DOM manipulation functions, then Brandon's plugin will attach the focus handler. How cool is that? This is part of the total unobtrusive JavaScript solution stock trading.

If this is enough for the non-bubbling situations you are talking you can do that with my NWEvents too. Have you seen the complete example, the "input" boxes at the bottom ?

I used an "mouseover" to autofocus the input boxes and change their background color, and as a more elaborate test I added a second selector rule that makes the input boxes "lightblue" when they contains the value "50". As you see this is very dynamic. If you write "50" in the other boxes you also get the same behavior if you "mouseout/mouseover" them.

I still don't understand why in Brandon solution there is a need to wait for a bubbling event to attach a non-bubbling event to finally do some checking on some field.

If I understand correctly and this is the problem you are referring well, you should solve this with a combination of "onmouseup+onkeyup" Delegates on the input elements. This will also take care of when you are landing on an input box with the TAB key. This will work in Brandon solution too.

As I said before Brandon solution will still leave these elements exposed, because he cannot attach the events before an "onload" event has notified about the page being complete. My solution does not require this because it attaches events to the root element ("documentElement") which does already exists when your scripts start executing, no way for failures property search.

Ok...How to for the non-bubbling events. You see, I don't want to escape your question because it is useful to have too.








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: How work this reusable form validation script ?
•  Re: IFRAME Problem: Scrollbar disappears if Resize IE window
•  Re: Print .doc file from the website using System.Diagnostics.Process
•  Re: Add an OnChange event to an ASP page
•  Re: Submit multiple forms with one button
•  Re: execute linux commands in perl script
•  Re: Print and print preview file on the website without using the File - Print on the IE
•  Argh, Javascript + Forms and me = DISASTER!
•  Need javascript code to identify non-searchable PDF


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2010