Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
This should be simple, but I don't see it
Message
General information
Forum:
ASP.NET
Category:
Other
Environment versions
OS:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01307914
Message ID:
01308724
Views:
7
>>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.aspx
Line 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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform