.Net Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - More.Net Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 23rd, 2003, 10:08 AM
gicio gicio is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Posts: 91 gicio User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 30 m 52 sec
Reputation Power: 11
Question ASP.NET: Problems with CustomValidator...

Hi!

I have a litte problem with my CustomValidator.


What my CustomValidator should do:
The CustomValidator should check if 2 textboxes are empty..
if yes he should diplay a message.


This is my code:

Code:
<asp:customvalidator id="CustomValidator1" runat="server" ErrorMessage="Sie müssen min. 1 Telefonnummer angeben"
		Display="Static" OnServerValidate="ValidateExistanceOfPhones"></asp:customvalidator></P>



Code:
	<script runat="server">
		void ValidateExistanceOfPhones(object source, ServerValidateEventArgs args)
		{
			args.IsValid = !((m_txtTelephoneNumber.Text.Length == 0) && (m_txtMobileNumber.Text.Length == 0));
		}
	</script>




the calidator check ValidateExistanceOfPhones. but when args.IsValid = false the message isn't
shown. What is the problem??!
Make I something wrong?

2. quastion: is it possible to check the state of the 2 textboxes on the client side?
when YES how?



best regards,


gicio

Reply With Quote
  #2  
Old October 26th, 2003, 11:40 PM
sano sano is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2000
Location: Redmond, WA
Posts: 218 sano User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 14
The URL below should answer both of your questions.

http://samples.gotdotnet.com/quicks...or8.aspx&font=3

Reply With Quote
  #3  
Old October 27th, 2003, 09:26 AM
gicio gicio is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Posts: 91 gicio User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 30 m 52 sec
Reputation Power: 11
Big THX to sano!!!!!!!!!!!





regards,


gicio

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - More.Net Development > ASP.NET: Problems with CustomValidator...

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap