473,398 Members | 2,368 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

ASP.NET: regex validation on a text box locks-up text box on postback.

Hi,
I have a web application (done in ASP/C#) that has regex validation on a text box. Initially the regex works perfectly fine. But then I also provide a button click event (clear) that allows the user the clear text box and change their input for a new query. At this point (page post back) the regex takes control and maintains control of the text box so a new query can't be run. Can anyone tell me what to do so that the regex doesn't fire on page postback and allows new input for validation?
** Edit ** Removed illegal email address
Nov 10 '10 #1
1 1568
Just check the CausesValidation property of Cancel button to false
Nov 11 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: engwar1 | last post by:
Not sure where to ask this. Please suggest another newsgroup if this isn't the best place for this question. I'm new to both vb.net and regex. I need a regular expression that will validate what...
2
by: Matt Mercer | last post by:
Hi, My first post here. I am a self-taught, very "green" web developer. It is not the main focus of my job but required from time to time. I am developing a web application that logs security...
1
by: Tom | last post by:
I have created a new site, using asp.net c#. My pages contain client side validation to validate the users input. On my local machine this works fine, but when I moved my site to the test server,...
7
by: Opa | last post by:
Hi, I'm trying to validate a textbox such that it only alpha characters are accepted. I have the following Regex expression exactly as shown in the RegularExpressionValidator control, but it...
1
by: JP2006 | last post by:
I am using asp.net input validation on a web form to check user input. The web form is on a web user control which is then dragged on to a ..aspx page. The .aspx page also contains other web user...
7
by: MattMika | last post by:
Can anyone point out the problem with this? The commented regex var and if statement dont work and break the GroupName check when uncommented. I tested the AccessCodeRegxp with preg_match and it...
3
by: John Grandy | last post by:
Does anyone have experience with turning off ASP.NET event validation ? What is the complete set of consequences ? I'm aware that event validation ensures that parameter values submitted to...
0
by: wbosw | last post by:
I'm trying to create a regex to find more than one capital letter position within a word. The below regex, finds the first capital letter in the word and returns the index for that character. I...
0
by: Wilson799799 | last post by:
Hello, I am searching for a way to match quotation marks (extended ascii characters 147 and 148) with a .net regex. I tried this regex += .... |" + System.Convert.ToChar(147) + "|" +...
2
by: varunrap | last post by:
Hi, I have an application in which I need to validate a word which might have multiple variation. For example, the word "trust". I need a regex validation to pull out variations like, trusty,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
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...
0
agi2029
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,...
0
isladogs
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...

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.