function ShowError()
{
alert("There is an error!!");
}
protected void ListView_OnItemCommand(object sender, ListViewCommandEventArgs e)
{
if (String.Equals(e.CommandName, "CommandName"))
{
Page.ClientScript.RegisterStartupScript(GetType(), "Key", "ShowError();", true);
}
}