Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #11 (permalink)  
Old December 31st, 2008, 06:47 AM
bex bex is offline
Friend of Wrox
 
Join Date: Aug 2008
Location: london, , United Kingdom.
Posts: 154
Thanks: 7
Thanked 1 Time in 1 Post
Default

thank you for the code can you please tell me where it goes?(under which event)
__________________
bx
  #12 (permalink)  
Old December 31st, 2008, 10:54 AM
Lee Dumond's Avatar
Wrox Author
Points: 4,942, Level: 29
Points: 4,942, Level: 29 Points: 4,942, Level: 29 Points: 4,942, Level: 29
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2008
Location: Decatur, IL, USA.
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default

It goes in the page's code behind. The event it handles is the ServerValidate event of the CustomValidator.
__________________
Visit my blog at http://leedumond.com
Follow me on Twitter: http://twitter.com/LeeDumond

Code:
if (this.PostHelpedYou)
{
   ClickThanksButton(); 
}
  #13 (permalink)  
Old January 1st, 2009, 07:07 AM
bex bex is offline
Friend of Wrox
 
Join Date: Aug 2008
Location: london, , United Kingdom.
Posts: 154
Thanks: 7
Thanked 1 Time in 1 Post
Default

sorry to ask but what is custval_txtTeam is the textbox ?
__________________
bx
  #14 (permalink)  
Old January 1st, 2009, 12:28 PM
Lee Dumond's Avatar
Wrox Author
Points: 4,942, Level: 29
Points: 4,942, Level: 29 Points: 4,942, Level: 29 Points: 4,942, Level: 29
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2008
Location: Decatur, IL, USA.
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default

Quote:
Originally Posted by bex View Post
sorry to ask but what is custval_txtTeam is the textbox ?
No, that's a CustomValidator in the page.

This code is from a blog post example. If you had read the actual post it came from, it would make sense.
__________________
Visit my blog at http://leedumond.com
Follow me on Twitter: http://twitter.com/LeeDumond

Code:
if (this.PostHelpedYou)
{
   ClickThanksButton(); 
}
  #15 (permalink)  
Old January 2nd, 2009, 10:14 AM
bex bex is offline
Friend of Wrox
 
Join Date: Aug 2008
Location: london, , United Kingdom.
Posts: 154
Thanks: 7
Thanked 1 Time in 1 Post
Default

the custval It is not declared, can you tell me where to? if you can send me the code it will be best
thanks
__________________
bx
  #16 (permalink)  
Old January 2nd, 2009, 10:33 AM
Lee Dumond's Avatar
Wrox Author
Points: 4,942, Level: 29
Points: 4,942, Level: 29 Points: 4,942, Level: 29 Points: 4,942, Level: 29
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2008
Location: Decatur, IL, USA.
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default

Quote:
Originally Posted by bex View Post
the custval It is not declared, can you tell me where to? if you can send me the code it will be best
thanks
The code is all right there in the blog post. This is the declaration for the CustomValidator in the post:

Code:
<asp:CustomValidator ID="custval_txtTeam" runat="server" 
   ErrorMessage="That name is already taken. Please pick another." 
   ControlToValidate="txtTeam" Display="Dynamic" 
   OnServerValidate="custval_txtTeam_ServerValidate" />
Seriously, there's nothing I can send you that isn't already presented in the post. Is there something you don't understand about the post? I don't know how I can make it any plainer.
__________________
Visit my blog at http://leedumond.com
Follow me on Twitter: http://twitter.com/LeeDumond

Code:
if (this.PostHelpedYou)
{
   ClickThanksButton(); 
}

Last edited by Lee Dumond; January 2nd, 2009 at 10:35 AM.. Reason: format code
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
code to check values in two columns?? Mazzy Excel VBA 2 December 13th, 2007 07:39 AM
Check for items with low values adias SQL Language 0 May 5th, 2006 02:01 PM
Check values Dj Kat MySQL 2 March 23rd, 2006 04:10 AM
how can i check for duplicate values before saving noor ASP.NET 1.0 and 1.1 Basics 3 June 10th, 2005 09:28 AM
help me to pass the check box values to new page ansar BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 0 November 16th, 2004 06:08 AM



All times are GMT -4. The time now is 08:00 AM.


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