ASP.Net: Para resaltar una fila (event onmouseover) de un GridView.

protected void grvPersonas_RowCreated(object sender, GridViewRowEventArgs e)
{
// only apply changes if its DataRow
if (e.Row.RowType == DataControlRowType.DataRow)
{
// when mouse is over the row, save original color to new attribute, and change it to highlight yellow color
//e.Row.Attributes.Add(“onmouseover”, “this.originalstyle=this.style.backgroundColor;this.style.backgroundColor=’#FFFFFF’;this.style.cursor=’hand’;”);
e.Row.Attributes.Add(“onmouseover”, “this.style.textDecoration=’underline’;this.style.cursor=’hand’;”);
// when mouse leaves the row, change the bg color to its original value
//e.Row.Attributes.Add(“onmouseout”, “this.style.backgroundColor=this.originalstyle;this.style.cursor=’cursor’;”);
e.Row.Attributes.Add(“onmouseout”, “this.style.textDecoration=’none’;this.style.cursor=’cursor’;”);
}
}

ASP.Net (Ajax) Función para poder mostrar un alert()

protected void ShowAlert(string message)
{
StringBuilder scriptBuidler =
new StringBuilder(@”<script type=’text/javascript’ language=’javascript’>”);
scriptBuidler.Append(@”alert(‘”);
scriptBuidler.Append(message);
scriptBuidler.Append(@”‘);”);
scriptBuidler.Append(@”</script>”);
AjaxControlToolkit.ToolkitScriptManager.RegisterClientScriptBlock
(this, typeof(Page),
“Patient Detail Not Found”,
scriptBuidler.ToString(),
false
);
}