This one looks similar to the question that is asked here but the scenario asked by the OP looks different as his accepted answer do does not meet my requirement.In my case, I am trying to embed an asp snippet as parameter of a Javascript method called from an onclick
of button , but the result is that the tags gets escaped when compiled. The ASP code is :
<asp:Button runat="server" ID="Calculate_Mean" Text="Calculate Mean"
OnClientClick="mean('<%$TextBoxA.ClientID + ',' + TextBoxB.ClientID + ',' +
TextBoxC.ClientID%>')"
The Outcome I got is:
<input type="submit" name="Calculate_Mean"
value="Calculate Mean"
onclick="mean('<%=TextBoxA.ClientID%>');" id="Calculate_Mean" />
I've referred and tried the following pages but still couldn't solve the issue:
Passing ASP.net control to JS Function
Different Embedded ASP Code Blocks and its uses