C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » ASP.NET »

Validation Controls


Posted Date: 09 Jul 2006      Posted By: Vijay Kumar      Member Level: Silver     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

Author: Vivek anand    09 Jul 2006Member Level: BronzeRating: 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



Author: HimaBindu Veeramachaneni    10 Jul 2006Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

Set Causes Validation Property to false

http://dotnetspider.com/mentors/18-HimaBindu-Veeramachaneni.aspx?tab=details'



Author: Murali Krishna    14 Oct 2008Member Level: BronzeRating: 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


Author: ramakrishna reddy    18 Oct 2008Member Level: BronzeRating: 2 out of 52 out of 5     Points: 0

xlent


Author: Lokesh    20 Oct 2008Member Level: SilverRating: 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.



Author: Sukanya     23 Oct 2008Member Level: DiamondRating: 2 out of 52 out of 5     Points: 0

put CausesValidation=False


Author: T.Thirumala Reddy    24 Oct 2008Member Level: BronzeRating: 2 out of 52 out of 5     Points: 1

change the property of control as

CausesValidation=false



Author: Samay Pattnayak    25 Oct 2008Member Level: BronzeRating: 2 out of 52 out of 5     Points: 1

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


Author: Monalisa Behera    04 Nov 2008Member Level: BronzeRating: 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.



Author: radeepdileep    19 Nov 2008Member Level: BronzeRating: 2 out of 52 out of 5     Points: 0

causesvalidation=false


Author: Deepika Haridas    22 Nov 2008Member Level: DiamondRating: 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
Editor

If U want to shine like a SUN..First U have to burn like the SUN!!
Need a Guide? Join my mentor program..



Author: siri    12 Dec 2008Member Level: BronzeRating: 2 out of 52 out of 5     Points: 0

hi,
chang cause validation proprty to False..



Author: Neeraj Kumar SIngh    13 Dec 2008Member Level: SilverRating: 2 out of 52 out of 5     Points: 1

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


Author: balaguru    22 Dec 2008Member Level: BronzeRating: 2 out of 52 out of 5     Points: 0

causes validation=false


Author: Chandan Kumar Badajena    03 Jan 2009Member Level: BronzeRating: 2 out of 52 out of 5     Points: 1

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


Author: Antony Benadict Amal    07 Jan 2009Member Level: SilverRating: 2 out of 52 out of 5     Points: 0

chang the property control
CausesValidation=false



Author: Varma Suresh    27 Jan 2009Member Level: GoldRating: 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



Author: Amit Gaurav Pandey    28 Jan 2009Member Level: BronzeRating: 2 out of 52 out of 5     Points: 0

set CausesValidation=False for the link button


Author: LOGESHWARAN    11 Feb 2009Member Level: GoldRating: 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



Author: Rajendra    18 Feb 2009Member Level: GoldRating: 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

---



Author: Rajendra    18 Feb 2009Member Level: GoldRating: 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

---



Author: viraj rabara    23 Feb 2009Member Level: BronzeRating: 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: ASP.NET



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use