Monday

C# find text in .net grid Rows


public bool OrderExists(int order_index)
{
foreach (GridViewRow r in gvMerchantCategories.Rows)
{
int ord1 = 0;
if (int.TryParse(r.Cells[2].Text, out ord1) && ord1 == order_index)
{
gvMerchantCategoriesLabel.Text = "Update Not Successful, Order Index Already exists";
gvMerchantCategoriesLabel.Style.Add("color", "#FF0000");
return true;
}
}

}

No comments:

test smtp server with powershell

Send-MailMessage -SMTPServer smtp.domain.com -To [email protected] -From [email protected] -Subject "This is a test email" -Body ...