各位大侠:我用的是下面一段代码
public load(..)
...
Dim ds As New DataSet
Dim strPathToXml As String = "c:\MyData.XML"
ds.Tables.Add(dt)
ds.WriteXml(strPathToXml, XmlWriteMode.IgnoreSchema)
ShowXmlInIE(strPathToXml)
End Sub
Public Sub ShowXmlInIE(ByVal strPathToXml As String)
Dim ie As New SHDocVw.InternetExplorer
ie.Navigate(strPathToXml)
ie.Visible = True
End Sub
这样show出的是xml 格式,怎样修改让它show成网页
直接从datagrid转html
Dim tw As New System.IO.StringWriter()
Dim hw As New System.Web.UI.HtmlTextWriter(tw)
DataGrid1.RenderControl(hw)
Response.Write(tw.ToString())