Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
|
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 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 December 31st, 2008, 06:47 AM
bex bex is offline
Friend of Wrox
 
Join Date: Aug 2008
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
 
Old December 31st, 2008, 10:54 AM
Lee Dumond's Avatar
Wrox Author
 
Join Date: Jan 2008
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(); 
}
 
Old January 1st, 2009, 07:07 AM
bex bex is offline
Friend of Wrox
 
Join Date: Aug 2008
Posts: 154
Thanks: 7
Thanked 1 Time in 1 Post
Default

sorry to ask but what is custval_txtTeam is the textbox ?
__________________
bx
 
Old January 1st, 2009, 12:28 PM
Lee Dumond's Avatar
Wrox Author
 
Join Date: Jan 2008
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(); 
}
 
Old January 2nd, 2009, 10:14 AM
bex bex is offline
Friend of Wrox
 
Join Date: Aug 2008
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
 
Old January 2nd, 2009, 10:33 AM
Lee Dumond's Avatar
Wrox Author
 
Join Date: Jan 2008
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





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





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