Commonly confirmed deletion prompt

zhaozj2021-02-16  105

Delete confirmation prompt in the general page:

Add: button1.attributes.add ("Onclick", ");"); ");"); ");

Delete confirmation prompt in DataGrid:

Suppose in the template column: Add: Private Void DataGrid1_ItemDataBound (object sender, System.Web.UI.WebControls.DataGridItemEventArgs e) {if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) {LinkButton btn = (LinkButton) e .Item.FindControl ("btndel"); Btn.attributes.Add ("Onclick", "Return Confirm ('Are you sue to delete?');");}}

转载请注明原文地址:https://www.9cbs.com/read-11066.html

New Post(0)