如何将表对象更改为字符串? [英] How to change a table object to string ?

查看:67
本文介绍了如何将表对象更改为字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


亲爱的,



我需要将表对象转换为html字符串。目前我正在使用Asp.net和vb。



我需要将一个表格对象传递给一个div。



这是我的代码:



Dear all,

I need to convert a table object to a html string .Currently I am using Asp.net with vb.

I need to pass a table object to a div.

Here is my code :

Dim value As Table

        Dim array() As Object = extractedNodesExclusive.ToArray()

        For Each element In array
 
            value = element

        Next

        div_Recommendation.Controls.Add(value)





错误:Aspose.Words.Tables.Table类型的值无法转换为System.Web。 UI.Control'。

任何人都可以帮助我吗?



无法投射'Aspose.Words.Tables.Table'类型的对象输入'System.Web.UI.Control'。





谢谢

alis



Error :Value of type 'Aspose.Words.Tables.Table' cannot be converted to 'System.Web.UI.Control'.
Can anyone help me?
and
Unable to cast object of type 'Aspose.Words.Tables.Table' to type 'System.Web.UI.Control'.


Thanks
alis

推荐答案

ASP.NET有一个TON控件,可以将表转换为HTML。网格视图,转发器,数据网格,你的名字。



错误意味着它所说的。你写的代码是胡说八道。您不将表转换为控件。您将表中的数据传递给控件的数据上下文。
ASP.NET has a TON of controls that turn tables in to HTML. grid view, repeater, datagrid, you name it.

The error means what it says. The code you wrote is nonsense. You don't convert a table to a control. You pass the data in the table to the data context of the control.


这篇关于如何将表对象更改为字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆