componentart.web.ui控制項繫結所用xml,同時用於dropdownlist的繫結,xml如下:
<
sitemap
>
<
item
text
="標題一"
id="1"
/>
<
item
text
="標題二"
id="4"
/>
<
item
text
="標題三"
id="5"
/>
<
item
text
="標題四"
id="6"
/>
<
item
text
="標題五"
id="7"
/>
sitemap
>
c#**:
1///
2///
從xml檔案讀取資料繫結到列表控制項
3///
4///
5///
6///
readxmlbindlistcontrol("tabdata.xml", this.ddl1);
7///
8///
9///
xml檔案路徑
10///
listcontrol id
11public
static
void
readxmlbindlistcontrol(
string
filepath, system.web.ui.webcontrols.listcontrol lic)
1218
19lic.items.clear();
20xmldocument doc
=new
xmldocument();
21doc.load(path);
22foreach
(xmlnode node
indoc.documentelement.childnodes)
2328}29
}
從XML檔案中讀取資料
using system using system.data using system.configuration using system.web using system.web.security using system.web.ui using system.web.ui.webcontro...
從檔案讀取資料到SAP
從檔案讀取資料到sap report z read file neil data begin of man,name 20 type c,high type p decimals 2,weight type p decimals 2,end of man.data man1 like table o...
從XML中讀取資料到記憶體的例項
public clssimuresultbyonegoods getonegoodssimulationxml string pathandfilename break default break else if r.nodetype xmlnodetype.endelement break def...