Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 18th, 2005, 05:24 AM
PT PT is offline
Authorized User
 
Join Date: Jun 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Regular expression validator

hey all,

I am using the Regular Expression Validator to validate a couple of textboxes

The problem is: i want the people to know whats is wrong in the text they wrote... i know that the Regular Expression Validator has a message when the expression is not valid. but i dont have any space to put 15 messages as i have a lot of textboxes

Is there an event that occurs when the expression is validated? Because i want to use it so i can show a message in a label or a messagebox

thanks in advance
/PT
 
Old July 22nd, 2005, 05:44 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 453
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Ankur_Verma Send a message via MSN to Ankur_Verma
Default

Have you tried ValidationSummary class yet. See if it serves the purpose. You may want to turn the Display property of Reg...Validator false.



Regards
Ankur Verma
 
Old July 25th, 2005, 09:06 AM
PT PT is offline
Authorized User
 
Join Date: Jun 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

tkz but... it's not what i wanted
imagin this:

  -i have several texboxes and ValidationExpressions for each
   then 2 buttons:
   one that checks if the textboxes are valid and another to clean
   everything inside the textboxes

  -if one or more textboxes aren´t valid i wont be able to clean
   them... because ValidationExpressions will "wait" until all fields
   are valid so i they can be clean

so basically i want to clean the textboxes even if the text is not valid

/PT

 
Old August 8th, 2005, 08:42 AM
Registered User
 
Join Date: Aug 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi..
you tri to set the property of button
CausesValedation=false

akd
 
Old August 25th, 2005, 07:50 AM
PT PT is offline
Authorized User
 
Join Date: Jun 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

tkz dajay
you helped me a lot

/PT






Similar Threads
Thread Thread Starter Forum Replies Last Post
Regular Expression Validator on Multi-Line TextBox wagswvu General .NET 1 June 4th, 2008 09:24 AM
Regular Expression Validator displaying a label thomaswharmanjr26 C# 0 January 25th, 2008 03:38 PM
Validator expression Maxxim ASP.NET 1.0 and 1.1 Professional 1 December 3rd, 2006 07:07 AM
question regarding regular expression validator NewbieProg Classic ASP Basics 1 November 9th, 2004 08:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.