473,587 Members | 2,568 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Disallow space using regular expression validator

I am building a form in asp.net 2.0
On one of the textboxes, I don't want that the user will use the space
How do I disallow space using regular expression validator (or other
validator) ?



Nov 15 '06 #1
1 17506
The regular expression for no spaces is this one


or preferable this one

Bits. Bytes.
"Zorik" wrote:
I am building a form in asp.net 2.0
On one of the textboxes, I don't want that the user will use the space
How do I disallow space using regular expression validator (or other
validator) ?



Nov 15 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: UndoMiel | last post by:
Hi, I am looking for a way to validate IP addresses using XML Schemas. The following is what i used: <xsd:simpleType name="IPType"> <xsd:restriction base="xsd:string"> <xsd:pattern value="((? | 1 | 2 | 25)\.){3} (? | 1 |
by: Mark | last post by:
To validate the length of a multiline textbox, I'm told that I have to use a regular expression validator. The regular expression below limits it to 25 characters in length, but if the user enters a hard return, it bombs regardless of length. How do you allow hard returns in the following regular expression? Thanks in advance! ^.{0,25}$ ...
by: VSK | last post by:
Hi all, I have a .ascx file with dropdownbox (SSN, EmpName) textbox submit button regular expression validator( controltovalidate is the above textbox) Now i want to change the Regular Expression of the validator based on the
by: tcb | last post by:
I have a RangeValidator setup for two input fields. The validator Type is set to Integer. If the user enters an alpha numeric, the validator works, however, if the user enters a space, the validator does not work. Does anyone know why this validator doesn't work for a space (or how to fix it Thanks tcb
by: Dot net work | last post by:
Hello. Say I have a .net textbox that uses a .net regularexpressionvalidator. If the regular expression fails, is it possible to launch a small client side javascript function to do something, such as change the border color of the textbox to red? That would look quite nice: if the expression fails, the red validator text is shown, plus...
by: simonc | last post by:
One of the things that drives me mad about vb.net is spending time trying to make a program do something then finding that there's already an inbuild procedure that does exactly the same thing. So before I begin on this can anyone tell me if there is already a routine to do this: I am dividing up a delimited textstring using...
by: vtxr1300 | last post by:
I'm having a problem with a regular expression in conjunction with the regular expression validator. I am trying to make sure that when a user browses for a file to upload, it ends in gif, jpeg or jpg. I have the following expression which validates fine in a .net tester I use and also a javascript tester. But when I use the following path on...
by: durga2005 | last post by:
hi i just added one textbox and regular expression validator in the form and set the properties for regular expression validator control. then i placed these two controls inside update panel . when i execute this, the validation was not working before placing in update panel validation was working
by: durga2005 | last post by:
hi i have a textbox and regular expression validator control .i have placed these control inside update panel. just im validating the textbox with regular expression validator control when i enter wrong data in the text box ,it is not showing error.only after i click the button it is showing the error message. before placing these...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.