在asp.net中对XML文档进行的操作(不全,待续)
读XML文件
DataSet books = new DataSet();
books.ReadXml(MapPath("booklist.xml"));
booklist.DataSource = books;
booklist.DataBind();
相关文档:
以下是系统自动生成的回调函数
<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['Form1'];
if (!theForm) {
theForm = document.Form1;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.ons ......
HttpContext.Current.Request.Url.ToString() 并不可靠。
如果当前URL为
http://localhost/search.aspx?user=http://csharp.xdowns.com&tag=%BC%BC%CA%F5
通过HttpContext.Current.Request.Url.ToString()获取到的却是
http://localhost/search.aspxuser=http://csharp.xdowns.com&tag=¼&fra ......
+++ 修改WebConfig文件:
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="connStr" value="Data Source=ora11g;uid=scott;pwd=tiger;unicode=true"/>
</appSettings>
<connectionStrings>
<ad ......
+++ PassDatatableByCache01.aspx页面
++ 页台代码如下:
<asp:Button id="Button1" onclick="Button1_Click" runat="server" Text="用Cache传数据集"></asp:Button>
++ 后台代码如下:
protected void Button1_Click(object sender, EventArgs e)
{
string connStr = "Data Source=ora11g;uid=sc ......