c# 从XML读数据
C#
DataSet ds = new DataSet();
ds.ReadXml(Server.MapPath("~/Config/User_yhlx_Jb.xml"));
DataView dv = ds.Tables[0].DefaultView;
//dv.RowFilter = "State=0";
this.DropDownList1.DataSource = dv;
this.DropDownList1.DataTextField = "text";
this.DropDownList1.DataValueField = "value";
this.DropDownList1.DataBind();
XML
<?xml version="1.0" encoding="utf-8" ?>
<selects>
<select>
<text>国家级</text>
<value>1</value>
</select>
<select>
<text>省级</text>
<value>2</value>
</select>
<select>
<text>市级</text>
<value>3</value>
</select>
</selects>
相关文档:
连接Access
首先看一个例子代码片断:
程序代码:
--------------------------------------------------------------------------------
using System.Data;
using System.Data.OleDb;
......
string strConnection="Provider=Microsoft.Jet.OleDb.4.0;";
strConnection+=@"Data Source=C:\BegASPNET\Northwind.mdb" ......
SQL中有四种基本的DML操作:INSERT,SELECT,UPDATE和DELETE。
INSERT语句
用户可以用INSERT语句将一行记录插入到指定的一个表中。例如,要将雇员John Smith的记录插入到本例的表中,可以使用如下语句:
INSERT INTO EMPLOYEES VALUES
('Smith','John','1980-06-10',
'Los Angles',16,45000);
......
java 代码
package com.dc.framework.taglib;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List; &nb ......
(一) 先讲一下XML中的物殊字符,手动填写时注意一下。
字符 字符实体
& ......
1
<asp:UpdatePanelID="UpdatePanel1"
UpdateMode="Conditional"
runat="server">
<ContentTemplate>
<asp:Button ID="Button1"
......