开发者

asp.net add control to datatable

开发者 https://www.devze.com 2023-03-04 07:26 出处:网络
is it possible to add a user control in a datatable in asp.net c#? The following code pr开发者_如何学JAVAoduces this: System.Web.UI.WebControls.TextBox instead of an input

is it possible to add a user control in a datatable in asp.net c#? The following code pr开发者_如何学JAVAoduces this: System.Web.UI.WebControls.TextBox instead of an input

    dr[0] = new TextBox (); // where dr is a dataRow and the datatable is 
                            // bound to a datagrid in the user control


As far I know, datatable can keep any data (may be in string format in your case) and give the output. But That doesnt mean that it will show you the control instead of textbox in output. To display Textbox in output there are other methods.

0

精彩评论

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