某一目录下的所有 xml文件绑定到不同的datagrid的方法
来源:互联网 发布:我们淘宝网秧歌服十一 编辑:程序博客网 时间:2024/05/17 09:06
原著:孟子e章
修改:塞北的雪
修改:塞北的雪
<%@ page language="vb"%>
<%@ import Namespace =namespace = "system" %>
<%@ import Namespace =namespace = "system.xml" %>
<%@ import Namespace =namespace = "system.io" %>
<%@ import Namespace =namespace = "system.collections" %>
<%@ import Namespace =namespace = "system.web" %>
<%@ import Namespace =namespace = "system.web.ui" %>
<%@ import Namespace =namespace = "system.web.ui.webcontrols" %>
<%@ import Namespace =namespace = "system.data" %>
<%@ import Namespace =namespace = "system.drawing" %>
<script runat="server">
Sub page_load()sub page_load( sender as object, e as system.eventargs)
dim dir as directoryinfo = new directoryinfo(server.mappath("remark"))
dim files as fileinfo() = dir.getfiles()
dim count as integer = files.length
dim i as integer
dim j as integer
dim k as integer
for i = 0 to count - 1
if files(i).name.substring(files(i).name.lastindexof(".")) = ".xml" then
dim ds as new dataset()
ds.readxml(files(i).fullname)
for k=0 to ds.tables.count-1
dim dt as datagrid = new datagrid()
dt.id = "datagrid" + i.tostring() + k.tostring()
dt.headerstyle.backcolor=color.red
dt.autogeneratecolumns=false
dim myname as boundcolumn()
redim myname(ds.tables(k).columns.count)
for j=0 to ds.tables(k).columns.count-1
myname(j)=new boundcolumn()
myname(j).headertext=ds.tables(k).columns(j).columnname
myname(j).datafield=ds.tables(k).columns(j).columnname
dt.columns.addat(0, myname(j))
next
dt.datasource = ds.tables(k)
dt.databind()
me.controls.add(dt)
next
end if
next
end sub
</script>
<%@ import Namespace =namespace = "system" %>
<%@ import Namespace =namespace = "system.xml" %>
<%@ import Namespace =namespace = "system.io" %>
<%@ import Namespace =namespace = "system.collections" %>
<%@ import Namespace =namespace = "system.web" %>
<%@ import Namespace =namespace = "system.web.ui" %>
<%@ import Namespace =namespace = "system.web.ui.webcontrols" %>
<%@ import Namespace =namespace = "system.data" %>
<%@ import Namespace =namespace = "system.drawing" %>
<script runat="server">
Sub page_load()sub page_load( sender as object, e as system.eventargs)
dim dir as directoryinfo = new directoryinfo(server.mappath("remark"))
dim files as fileinfo() = dir.getfiles()
dim count as integer = files.length
dim i as integer
dim j as integer
dim k as integer
for i = 0 to count - 1
if files(i).name.substring(files(i).name.lastindexof(".")) = ".xml" then
dim ds as new dataset()
ds.readxml(files(i).fullname)
for k=0 to ds.tables.count-1
dim dt as datagrid = new datagrid()
dt.id = "datagrid" + i.tostring() + k.tostring()
dt.headerstyle.backcolor=color.red
dt.autogeneratecolumns=false
dim myname as boundcolumn()
redim myname(ds.tables(k).columns.count)
for j=0 to ds.tables(k).columns.count-1
myname(j)=new boundcolumn()
myname(j).headertext=ds.tables(k).columns(j).columnname
myname(j).datafield=ds.tables(k).columns(j).columnname
dt.columns.addat(0, myname(j))
next
dt.datasource = ds.tables(k)
dt.databind()
me.controls.add(dt)
next
end if
next
end sub
</script>
- 某一目录下的所有 XML文件绑定到不同的DataGrid的方法
- 某一目录下的所有 xml文件绑定到不同的datagrid的方法
- 将某一目录下的所有相同格式的 XML文件绑定到不同的DataGrid
- 将某一目录下的所有相同格式的 XML文件绑定到不同的DataGrid
- 将某一目录下的所有相同格式的 XML文件绑定到不同的DataGrid
- 将某一目录下的所有相同格式的 XML文件绑定到不同的DataGrid
- 将某一目录下的所有相同格式的 XML文件绑定到不同的DataGrid
- 将某一目录下的所有相同格式的 XML文件绑定到不同的DataGrid
- 将某一目录下的所有相同格式的 XML文件绑定到不同的DataGrid
- 将某一目录下的所有相同格式的 XML文件绑定到不同的Da
- 复制某一目录下的所有文件
- 迭代某一目录下的所有目录及文件
- 将某一目录下所有的jar文件都加入到CLASSPATH当中的简便写法
- 在某一磁盘目录下将.txt的所有文件遍历打印到控制台上
- fso遍历某一目录下所有文件的函数
- 用VC++遍历某一目录下的所有文件
- java 遍历某一目录下的所有class文件
- 递归获取某一目录下的所有文件
- 如何成为一名合格的对日IT从业者
- ASP编程中20个非常有用的例子;Vbscript和Javascript相互调用详解
- TreeView基本用法
- 毕业论文之烦脑
- 水晶报表crystalReportViewer老是弹出数据库登录对话框的解决方法
- 某一目录下的所有 xml文件绑定到不同的datagrid的方法
- Visual Studio.NET快捷键
- 三步学会Java Socket编程
- Delphi判断文件大小
- js
- Linux下配置java环境变量以及Eclipse配置
- windows2003的单用户远程登陆设置。
- MFC 中集成 Html 的3种方式
- WPF中控件的焦点转移.