when i make control dynamically from javascript in asp.net then some control make out side of page like div and linkbutton

I think you’re asking if you can dynamically create a server control in ASP.NET with JavaScript. The short answer is no.

You can create DOM elements via JavaScript, but you can’t create server controls, such as LinkButtons, since they "run at" the server, not the client.

That said, ASP.NET versions 2+ come with AJAX-enhanced controls that probably will meet your needs (http://dougv.us/o1) maybe the AlwaysVisible control is what you’re after. Versions 3.5+ natively support jQuery (http://dougv.us/o2), which you could use to remove / show / hide server controls after they are output.

Ask me anything

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>