This is a migrated thread and some comments may be shown as answers.

OnClientClick and Eval()

2 Answers 99 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Amanda
Top achievements
Rank 1
Amanda asked on 15 Dec 2010, 05:36 PM
I am trying to set confirmDelete to ask if they want to delete a specific vendor.  \

<asp:Button ID="deleteButton" style="text-decoration:none" CommandName="Delete" runat="server" Text="Delete"
                                    CommandArgument='<%# Eval("VendorCode") + "," + Eval("Vendor") %>' OnClick="vendor_Delete"
                                    OnClientClick='<%#Eval("Vendor", "return confirmDelete(\"{0}\")")%>'
                                 </asp:Button>

    <script type="text/javascript">
        function confirmDelete(vendor) {
            alert("Are you sure that you want to delete " + vendor + "?";
        }
    </script>

I am getting a The server tag is not well formed.  Can you help me with this?

Thanks.

2 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 15 Dec 2010, 05:41 PM
Hello Amanda,

It looks like you need the ASP.NET forums. This is the WinForms forum. Please can you post in the ASP.NET forum as this is where the experts for that live
Thanks
Richard
0
Amanda
Top achievements
Rank 1
answered on 15 Dec 2010, 05:41 PM
Thanks.  Sure will!
Tags
General Discussions
Asked by
Amanda
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Amanda
Top achievements
Rank 1
Share this question
or