Subscribe to Subscribers

Online Members

AHMED
More...

Forums » .NET » ASP.NET »

Validation Controls


Posted Date: 09 Jul 2006      Posted By:: Vijay Kumar     Member Level: Silver    Member Rank: 0     Points: 2   Responses: 22



I have a Login Page, i placed a one LinkButton as NewUserSignUp to go to UserRegistration page. But the RequiredField Validator which i placed for the two TextBoxes(which are in Login Page). When i clicked on that LinkButton, those RequiredField Validators are not allowed to go to that page?.........Please help me...............



Responses

#62419    Author: Vivek anand      Member Level: Bronze      Member Rank: 0     Date: 09/Jul/2006   Rating: 2 out of 52 out of 5     Points: 2

Hi,
You can avoid validator control execution to specific control by simply adding the attribute "CausesValidation=False".

In your case





<asp:LinkButton ID="Newuser" Runat=server CausesValidation=False>New User Signup</asp:LinkButton>





Regards
Vivek


 
#62448    Author: HimaBindu Vejella      Member Level: Gold      Member Rank: 42     Date: 10/Jul/2006   Rating: 2 out of 52 out of 5     Points: 2

Set Causes Validation Property to false

http://himabinduvejella.blogspot.com
http://sysntaxhelp.com/asp.net
http://groups.google.com/group/mugh
Hima's Tech Blog


 
#306481    Author: Murali Krishna      Member Level: Bronze      Member Rank: 6308     Date: 14/Oct/2008   Rating: 2 out of 52 out of 5     Points: 5

For every post back controls their is a propety called "cause validation" by default it set to TRUE due to this property,before going to post back it check for all validation in a page in your case link button is a contorl having cause validation propety true by default so you need to set cause validation property FALSE for link button in order to skip checking the validation at the time of Page post back




 
#308259    Author: ramakrishna reddy      Member Level: Bronze      Member Rank: 0     Date: 18/Oct/2008   Rating: 2 out of 52 out of 5     Points: 0

xlent

 
#308621    Author: Lokesh      Member Level: Silver      Member Rank: 3599     Date: 20/Oct/2008   Rating: 2 out of 52 out of 5     Points: 4

there is causesvalidation property for button control on which clicking u want that no validation control is work, u should use ur link button control like that on which u dont want that any validation work:

<asp:LinkButton id="link2" runat="Server" Text="Login" CausesValidation="false"/>

Use causesvalidation property to false for that control.


 
#310025    Author: Sukanya       Member Level: Gold      Member Rank: 193     Date: 23/Oct/2008   Rating: 2 out of 52 out of 5     Points: 0

put CausesValidation=False

 
#310184    Author: T.Thirumala Reddy      Member Level: Bronze      Member Rank: 0     Date: 24/Oct/2008   Rating: 2 out of 52 out of 5     Points: 1

change the property of control as

CausesValidation=false


 
#310796    Author: Samay Pattnayak      Member Level: Bronze      Member Rank: 0     Date: 25/Oct/2008   Rating: 2 out of 52 out of 5     Points: 1

ya. u have to go to the property and set causes validation to be false.

 
#313098    Author: Monalisa Behera      Member Level: Bronze      Member Rank: 0     Date: 04/Nov/2008   Rating: 2 out of 52 out of 5     Points: 4

Hi,
The "asp:button" control has a property known as "CausesValidation". By Default this property is set to True. Change this to False i.e. CausesValidation = "False". This will prevent checking for validations in the page and hence you will be redirected to the desired page by the link button.


 
#318471    Author: radeepdileep      Member Level: Bronze      Member Rank: 0     Date: 19/Nov/2008   Rating: 2 out of 52 out of 5     Points: 0

causesvalidation=false

 
#319961    Author: Deepika Haridas      Member Level: Gold      Member Rank: 7     Date: 22/Nov/2008   Rating: 2 out of 52 out of 5     Points: 4

<script type="text/javascript">
function test()
{

if (document.getElementById("ctl00$ContentPlaceHolder1$TextBox1").value==""){
alert("Please enter the text");
return false;
}
else
{
return true;
}
}
</script>

<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="return test();" />



Thanks & Regards,
Deepika - Sr. Editor
Webmaster, GujaratSpider
http://angeldeeps.blogspot.com/
"Experience is the name everyone gives to his mistakes"
GujaratSpider - Post and Earn


 
#328406    Author: siri      Member Level: Bronze      Member Rank: 0     Date: 12/Dec/2008   Rating: 2 out of 52 out of 5     Points: 0

hi,
chang cause validation proprty to False..


 
#328785    Author: Neeraj Kumar SIngh      Member Level: Silver      Member Rank: 2542     Date: 13/Dec/2008   Rating: 2 out of 52 out of 5     Points: 1

you can add this code CauseValidation="false" for that link button.

 
#331590    Author: balaguru      Member Level: Bronze      Member Rank: 6394     Date: 22/Dec/2008   Rating: 2 out of 52 out of 5     Points: 0

causes validation=false

 
#334741    Author: Chandan Kumar Badajena      Member Level: Bronze      Member Rank: 7463     Date: 03/Jan/2009   Rating: 2 out of 52 out of 5     Points: 1

Hi vijay, you have to make the causes validation property to "false".

 
#335841    Author: Antony Benadict Amal      Member Level: Silver      Member Rank: 0     Date: 07/Jan/2009   Rating: 2 out of 52 out of 5     Points: 0

chang the property control
CausesValidation=false


 
#340831    Author: Varma Suresh      Member Level: Gold      Member Rank: 336     Date: 27/Jan/2009   Rating: 2 out of 52 out of 5     Points: 1

hi..
Set
Causes Validation Property to false
OR

set groupname to all except those U dont want to validate

H2H
Defeat the Defeat before the Defeat Defeats you
With Regards
V.Suresh Varma


 
#341300    Author: Amit Gaurav Pandey      Member Level: Bronze      Member Rank: 7798     Date: 28/Jan/2009   Rating: 2 out of 52 out of 5     Points: 0

set CausesValidation=False for the link button

 
#346165    Author: LOGESHWARAN      Member Level: Gold      Member Rank: 0     Date: 11/Feb/2009   Rating: 2 out of 52 out of 5     Points: 3

there is causesvalidation property for button control on which clicking u want that no validation control is work, u should use ur link button control like that on which u dont want that any validation work:

<asp:LinkButton id="link2" runat="Server" Text="Login" CausesValidation="false"/>

Use causesvalidation property to false for that control.

REGARDS
LOGESHWARAN.P
mailto: logesh_ajax@logeshwaran.co.cc


 
#348090    Author: Rajendra      Member Level: Gold      Member Rank: 121     Date: 18/Feb/2009   Rating: 2 out of 52 out of 5     Points: 1

why are u using link button
just use a standard button
all problem will be rventually be solved

-----------------------------------
Life is a race,tez nahi bhagoge to log kuchalke agey niklenge!


 
#348093    Author: Rajendra      Member Level: Gold      Member Rank: 121     Date: 18/Feb/2009   Rating: 2 out of 52 out of 5     Points: 1

ok sorry i got ur question now....:)

as all said causevalidation should br set to false or put it ina different group of validation

-----------------------------------
Life is a race,tez nahi bhagoge to log kuchalke agey niklenge!


 
#350207    Author: viraj rabara      Member Level: Bronze      Member Rank: 0     Date: 23/Feb/2009   Rating: 2 out of 52 out of 5     Points: 1

Hi, you have to make CausesValidation = false
which is by default true.


 
Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.



Previous : no of click on advertisement in asp.net application
Return to Discussion Forum
Post New Message
Category:

Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Talk to Webmaster Tony John
Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
2005 - 2013 All Rights Reserved.
.NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
Articles, tutorials and all other content offered here is for educational purpose only.
We are not associated with Microsoft or its partners.