>>If I uncomment btnDelete part I get JavaScript confirm dialog, but regardless on the answer in doesn't delete.
>>
>>Without the dialog it deletes great.
>>
>>Do you see what's wrong here?
>
>What does your imagebutton tag look like in the ASPX page? Is the OnClick attribute set to anything?
I'm thinking the problem is related to the fact, that this is AJAX application.
So, I should not return confirm, but only return false if confirm returns false.
Here is how I tried to fix my code, but now I'm getting a JavaScript error:
missing ) after condition
http://localhost:3432/FCAdmin/AddUsers/Default.aspxLine 1
And this is my current code:
btnDelete.Attributes.Add("onClick",
"if (not confirm('Do you want to delete " +
e.Row.DataItem.ToString() + "?' )) return false;");
Do you see what's wrong here?
Thanks in advance.
If it's not broken, fix it until it is.
My Blog