This doesn't execute the delimiter (its displayed verbatim in the confirm dialog). Why not? Also, that variable is set in the codebehind, but is ready by the time PreRender gets called, so I should be OK right?
<asp:LinkButton ... OnClientClick=
"return confirm('Are you sure you want to remove Contract
Period <%= ContractPeriod_N.Text %>?');" />
Try doing it in the code behind:
theLinkButton.OnClientClick =
"return confirm('Are you sure you want to remove Contract Period " +
Server.HtmlEncode(ContractPeriod_N.Text) + "?');";
You need to set the property so that it is all from a render block or completely with out. Give this a try
<asp:LinkButton ... OnClientClick=
"<%= "return confirm('Are you sure you want to remove Contract
Period " + ContractPeriod_N.Text + "?');" %>" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With