about validations firing

Posted by Vijayar under C# on 4/22/2011 | Points: 10 | Views : 1224 | Status : [Member] | Replies : 2
i have a edit button inside a gridview,when i click on edit button validations are getting fired,how to avoid getting validations fired.i even wrote causesvalidation="false"

vijaya


Responses

Posted by: Naraayanan on: 1/9/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,
Just try this code, You get some Idea.

I have textBox in my form .It name is Textbox2.MessageBox displays when user pressed a F2 key . and I changed CausesValidation is false in the TextBox.
Key Down Event Code
   if (CausesValidation == false)

{
if (e.KeyCode == Keys.F2)
{
MessageBox.Show("Press F2");
}
}



Regards,
Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
http://abaprocker.blogspot.com/

Vijayar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Blessyjees on: 1/9/2012 [Member] Bronze | Points: 25

Up
0
Down
Hi,
If we set CausesValidation="False", the validation is not fired usually. If you are using validation group, remove that from the edit button

Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

Vijayar, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response