How to comment out server side code
<%-- <asp:Button . . . . /> --%>
This blog shares my journey as a software engineer, along with personal reviews and life experiences I’ve gained along the way. “I have not failed. I've just found 10,000 ways that won't work.” — Thomas Edison. If you enjoy my content, please support it by clicking on ads (free for you, big help for me!) or by buying me a coffee on Ko-fi. Thank you!
Thursday, October 20, 2005
Friday, October 07, 2005
Custom Validation
Today I created my first custom validation:
public void TextFilled(object sender, ServerValidateEventArgs e)
{
int counter = 0;
if(DropDownList_Awards.SelectedValue.ToString() == "4" && AwardDesc.Text == "")
{
counter++;
}
e.IsValid = (counter == 0) ? true : false;
}
Hower, I made a bad error: DUH!!!!
on the Button Click event add
if (Page.IsValid)
{
}
public void TextFilled(object sender, ServerValidateEventArgs e)
{
int counter = 0;
if(DropDownList_Awards.SelectedValue.ToString() == "4" && AwardDesc.Text == "")
{
counter++;
}
e.IsValid = (counter == 0) ? true : false;
}
Hower, I made a bad error: DUH!!!!
on the Button Click event add
if (Page.IsValid)
{
}
Subscribe to:
Posts (Atom)