开发者

How to create telerik RadTextbox dynamically from client side on button click

Is there anyway to create RadTextbox dynamically from client side like the ordinary html textbox like this.

$(document).ready(function(){ $("#btnCreateTextBox1").click(function(){ $("", {type: "text", "class": "numeric" }).appendTo('#conta开发者_开发问答iner'); }); }); Here it is an client side control it is creating but what about for the server control like RadTextbox or asp.net textbox control.


There really isn't a way to take a server control such as the RadTextBox and dynamically create it on the client. Taking a look at your specific example the reason this works is because, as you mentioned, you are creating a regular HTML element and not a complex control with potentially several HTML elements and server-side API.

You could of course instantiate the RadTextBox dynamically on the server-side or just use the markup approach for the non-dynamic way. You can then interact with the control via it's client-side objects as mentioned in this documentation article.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜