protected void btnDeleteEventScript_Click(object sender, EventArgs e) { OSAEScriptManager.ObjectEventScriptDelete(hdnSelectedEventScriptID.Text); loadEventScripts(); int selectedRow = Int32.Parse(hdnSelectedEventScriptRow.Text) - 1; if (selectedRow < 0) { hdnSelectedEventScriptRow.Text = ""; } else { hdnSelectedEventScriptRow.Text = selectedRow.ToString(); } }