View Single Post
Old 10-26-2005, 10:59 PM   PM User | #5
Cipher
Regular Coder

 
Cipher's Avatar
 
Join Date: Dec 2004
Posts: 123
Thanks: 0
Thanked 0 Times in 0 Posts
Cipher is an unknown quantity at this point
well it wont different much actualy , here's how to do it
first you need a JS function and you can place it anywhere, Body or Head

function confirmDelete() {
return window.confirm("are you sure?");
}


in Page_Load function:

Button1.Attributes.Add("OnClick", "return confirmDelete()")

if its in DataGrid Item Template

Dim i As Integer
For i = 0 To DataGrid1.Items.Count - 1
Dim Btn as Button = DataGrid1.Item(i).FindControl("Button1")
Btn.Attributes.Add("OnClick", "return confirmDelete()")
Next


Hope it works
__________________
i need a creative atmosphere
Cipher is offline   Reply With Quote