I want to add some text and an asp: button inside a Div using jQuery.
Code:
Hi, <p> Are you sure you want to go ahead</p><p>Please ignore this warning if this is not the first time you are logging in</p>
<asp:button ID="btnProceed" runat="server" Text="Proceed"></asp:button>
Implementation:
jQ('#proceedDiv').append("<div> Hi, <p> Are you sure you want to go ahead</p><p>Please ignore this warning if this is not the first time you are logging in</p> <asp:button ID="btnProceed" runat="server" Text="Proceed"></asp:button></div>");
but i am getting an error saying expected '('
That error is where button code starts. With alone text(and not button control) the code works fine. Can someone help me to fix it ?
<asp:button ID='btnProceed' runat='server' Text='Proceed'><asp:button>is a server-side component that renders to HTML markup in the page. jQuery allows you to modify that markup. Adding an<asp:button>element from the client side won't achieve anything, you should add the actual markup generated by the component instead.