Reputation: 45947
What is the correct syntax of this snippet:
<asp:Button OnClick="foo" runat="server" ID="foo"
OnClientClick="return confirm("'<%= GetLocalResourceObject("fooRessource") %>'");" />
i'm stuck with the '
and "
at OnClientClick
Upvotes: 0
Views: 284
Reputation: 46
could you not do this?
<asp:Button OnClick="foo" runat="server" ID="foo"
OnClientClick="return myconfirm()");" />
<script>
function myconfirm()
{
return confirm("<%= GetLocalResourceObject("fooRessource") %>");
}
</script>
Upvotes: 3
Reputation: 777
Can you do this in our code behind file?
foo.OnClientClick = "return confirm('" + GetLocalResourceObject("fooRessource") + "')";
I'm unsure how well this will work inline.
Upvotes: 1