Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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 June 12th, 2008, 09:43 AM
Authorized User
 
Join Date: Jun 2008
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to manojbhoyar Send a message via Yahoo to manojbhoyar
Default Validation Control Problem

Hi Every One. I am youngest member of this forum and very new to web programming.
I am facing problem with validation control of asp.net.
When i use validation control on my web form no server event by button is being fired? And if i remove validation control it works Perfectly.
But with validation control it just do nothing.
Is there ant one who can solve this problem.
Pleasssss.

 
Old June 13th, 2008, 07:46 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Without seeing any code I am not entirely sure what is going on. What it sounds like is that your validation control is stopping the execution of the page (as it should if the validation equates to false). You can override this functionality by adding the CausesValidation property to your button control and set its value to false.

<asp:Button id="btnFoo" runat="server" CausesValidation="false" />

hth.
-Doug

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor / Author :.
Wrox Books 24 x 7
================================================== =========
 
Old June 14th, 2008, 04:51 AM
Authorized User
 
Join Date: Jun 2008
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to manojbhoyar Send a message via Yahoo to manojbhoyar
Default

ok let me be more spacific on my issue.
There is a web form in my project containing couple of textboxes , button and dropdownlist.
Textboxes on page are being validated by Required Field Validators.
I have server code for button's click event and dropdown's selectedindexchange event. Now if i click button then Required Fiels Validator controls are working fine if i leave textbox(es) blank.
And if i fill all required textbox(es) then buttons click event is also being fired.
O.K. This is just perfect as it is supposed to be.
But This scenario is on my one server machine. Its working fine on that machine.
Now on another server machine where i have same project and same page,here what happening is that all validator controls are working just fine, they give error message if i leave any textbox blank and don't if i fill all textboxes. Up to here everything is OK.
But problem on this second machine is that, though i fill all textboxes and validator controls are not generating any error message, Button's click event is not being fired. It just do nothing if i click button. On this second machin's project if i set EnableClientScript property of validator controls to false then here alse things are working fine. But i don't wanna keep EnableClientScript property of validator to false.
Now i think this is enough clear to any one read this.
Please try on this issu
Bye.

Quote:
quote:Originally posted by dparsons
 Without seeing any code I am not entirely sure what is going on. What it sounds like is that your validation control is stopping the execution of the page (as it should if the validation equates to false). You can override this functionality by adding the CausesValidation property to your button control and set its value to false.

<asp:Button id="btnFoo" runat="server" CausesValidation="false" />

hth.
-Doug

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor / Author :.
Wrox Books 24 x 7
================================================== =========
 
Old June 17th, 2008, 12:46 AM
Authorized User
 
Join Date: Jun 2008
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to manojbhoyar Send a message via Yahoo to manojbhoyar
Default

Please any one will have look over my problem.
I need urgent solution.

 
Old June 20th, 2008, 04:05 AM
Authorized User
 
Join Date: Jun 2008
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to manojbhoyar Send a message via Yahoo to manojbhoyar
Default

hi all of you. I got solution for my problem.
I found it by self.
Here it is what i did, may be helpful to someoen
i give folowing command from visual studio command prompt.

aspnet_regiis -c








Similar Threads
Thread Thread Starter Forum Replies Last Post
Validation control help subhasps8 ASP.NET 2.0 Professional 1 July 30th, 2007 12:50 AM
Problem with validation inside user control aldwinenriquez ASP.NET 1.0 and 1.1 Professional 3 July 1st, 2007 09:53 AM
Validation control divsalar ASP.NET 1.x and 2.0 Application Design 1 December 25th, 2004 12:22 PM
Validation control ? basant ADO.NET 1 February 5th, 2004 04:46 AM





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