Hi, how can i do this client side, OnClientClick of the btnYes will return false if the gridview selected index < 0;
protected void btnYes_Click(object sender, EventArgs e)
{
if (gvCourseDetails.SelectedIndex == -1)
{
ClientScriptManager scriptManager = Page.ClientScript;
scriptManager.RegisterClientScriptBlock(this.GetType(), "alertmessage",
"<script>alert('Select a course above first');</script>");
}
}
Thanks.