C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






Validation Controls


Posted Date: 09 Jul 2006      Total Responses: 11

Posted By: Vijay Kumar       Member Level: Silver     Points: 2


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:     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:     Points: 2
Set Causes Validation Property to false


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


Author: Lokesh    20 Oct 2008Member Level: SilverRating:     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:     Points: 0
put CausesValidation=False


Author: T.Thirumala Reddy    24 Oct 2008Member Level: BronzeRating:     Points: 1
change the property of control as

CausesValidation=false


Author: Samay Pattnayak    25 Oct 2008Member Level: BronzeRating:     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:     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:     Points: 0
causesvalidation=false


Author: Deepika Haridas    22 Nov 2008Member Level: DiamondRating:     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();" />


Post Reply
You must Sign In to post a response.
Previous : no of click on advertisement in asp.net application
Return to Discussion Forum
Post New Message
Category: ASP.NET



dotNet Slackers   BizTalk Adaptors    Web Design

efax

Contact Us    Privacy Policy    Terms Of Use