T
thebison
Hi all,
I hope someone can help with this relatively simple problem.
I am building a timesheet application using ASP.NET C# with Visual
Studio 2003.As it is only a protoype application, my database has been
made in MSDE.
I have a DataGrid, and have inserted a delete link button into it
through Property Builder. My Delete method works fine, however I would
like to insert a JScript popup to confirm, as otherwise users can just
delete from the database. With my normal buttons, such as a 'submit'
button on a form, I can just use the following code:
btnSubmit.Attributes.Add("onclick","javascript:if(confirm('Create new
Department - are you sure?')== false) return false;");
However with the DataGrid, the Delete link is created through the
DataGrid, and I do not know how to assign JavaScript to it. I'm sure
someone else must've had this problem before, as no-one wants users to
be able to just delete records so freely!
I have already tried following this guide, but can't get it to work..
http://www.dotnetjunkies.com/HowTo/1E7FEE4A-795C-4D33-A135-843EB07C94A8.dcik
Any suggestions on how anyone has achieved this would be much
appreciated!
Al
I hope someone can help with this relatively simple problem.
I am building a timesheet application using ASP.NET C# with Visual
Studio 2003.As it is only a protoype application, my database has been
made in MSDE.
I have a DataGrid, and have inserted a delete link button into it
through Property Builder. My Delete method works fine, however I would
like to insert a JScript popup to confirm, as otherwise users can just
delete from the database. With my normal buttons, such as a 'submit'
button on a form, I can just use the following code:
btnSubmit.Attributes.Add("onclick","javascript:if(confirm('Create new
Department - are you sure?')== false) return false;");
However with the DataGrid, the Delete link is created through the
DataGrid, and I do not know how to assign JavaScript to it. I'm sure
someone else must've had this problem before, as no-one wants users to
be able to just delete records so freely!

I have already tried following this guide, but can't get it to work..
http://www.dotnetjunkies.com/HowTo/1E7FEE4A-795C-4D33-A135-843EB07C94A8.dcik
Any suggestions on how anyone has achieved this would be much
appreciated!
Al