Wrox Programmer Forums
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 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 January 20th, 2004, 09:05 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default ServerValidate event

Hello,

I have a form that has custom validators set up for the required fields. I also have link buttons for triggering the Page's validate() method. I also turned off CausesValidation on all of the links, so that the Page.Validate() method would trigger programmatically. The link code for triggering the validation and the server validation looks like:
Code:
private sub lnkAdd_Click(sender as object, e as eventargs) handles lnkAdd.Click
  Page.Validate()

  if ( not Page.IsValid ) then
    exit sub
  end if

  ...
end sub

private sub cuvName_ServerValidate(sender as object, args as ServerValidateEventArgs) handles cuvName.ServerValidate
  'Code to validate the name field
end sub

.. additional validators
I set up break points on all of the validators to debug, and the server validation events were never triggered when the page.validate() event fired. Anybody know why? I can get them to work in another web form similar to this manner.

Thanks,

Brian Mains
__________________
Brian





Similar Threads
Thread Thread Starter Forum Replies Last Post
Event - Sender & Event args dash dev C# 2005 9 December 9th, 2007 07:24 AM
first event bostek Excel VBA 2 September 7th, 2006 02:13 AM
What Event Exactly? Macsood ASP.NET 1.0 and 1.1 Basics 6 October 26th, 2005 09:24 AM
About Button event and Keydown event zhangxujun1981 XSLT 1 March 6th, 2004 04:59 AM
how to override an event with an event? blah VB.NET 2002/2003 Basics 5 November 13th, 2003 03:06 PM





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