Is it possible to do something like this
$("#popupForgot").append("<asp:TextBox ID='emailTextF' runat='server' Width='200px' Text='" + $.cookie("forLogin") + "'></asp:TextBox>")
I need to append an asp.net element to a div tag which will have the cookie value as it’s text. I’ve tried with the code above and it doesn’t work.
Thank you in advance
It is not possible to do this, because
asp:TextBoxis rendered via server-side, whereas jQuery works on client-side.However you can render your textbox with
asp:TextBoxcontrol and then you can change its value with jQuery:UPDATE
It turns out that
asp:TextBoxrendered id isn’t equal toidparameter (used insideasp:TextBox), try this: