上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 20 下一页
摘要: 后台代码: protected void Page_Load(object sender, EventArgs e) { XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(Server.MapPath(@".\file\XMLFile.xml")); XmlNodeList ndlist = xmlDoc.GetElementsByTagName("data"); foreach (XmlNode xl in ndlist) { Response.Write(xl.ChildNodes[0].InnerText + "--" + xl.Ch 阅读全文
posted @ 2010-12-08 15:33 露水丛生 阅读(702) 评论(0) 推荐(0) 编辑
摘要: script language="JavaScript"var bigX = 300; //预览窗大小,可以任意设置var bigY = 300;var smallX = 300; //缩略图宽度var smallY = 225;var srcX = 1024; //原图大小,可以任意设置var srcY = smallY * srcX / smallX;var viewX = bigX / srcX * smallX; //预览范围var viewY = bigY / srcY * smallY;var bl = srcX / smallX;//缩小比例var border = 1; / 阅读全文
posted @ 2010-12-06 20:50 露水丛生 阅读(1668) 评论(0) 推荐(0) 编辑
摘要: HTML的代码:!-- Document : ASP.NET用一般处理程序生成验证码 Created on : 2010-6-3 17:04 Author : lostwolf--!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"htmlheadtitle/titlemeta http-equiv="Content-Type" content="text/html; charset=UTF-8" /script type="text/javascript" function chang 阅读全文
posted @ 2010-12-06 16:57 露水丛生 阅读(333) 评论(0) 推荐(0) 编辑
摘要: 如果有文件夹abc,和aaa.jpg文件 ./abc/aaa.jpg ./abc\aaa.jpg ../abc/aaa.jpg ~/abc/aaa.jpg /abc/aaa.jpg http://localhost/abc/aaa.jpg Server.MapPath("./abc/")+"aaa.jpg" 以及"//"和"\"含义!/ 是超文本协议的路径分隔符号,所有的网站在浏览器中显示的路径分隔都是以"/"表示.它一般代表虚拟路径. 在普通程序代码中则以"\"表示文件路径分隔符号.它一般指物理路径. ./ 表示在当前路径下, ../表示在当前路径的上一级路径下. ~/表示当前网站的根目录下 阅读全文
posted @ 2010-12-06 16:51 露水丛生 阅读(759) 评论(3) 推荐(0) 编辑
摘要: 使用网站中的资源时,通常必须指定资源的路径。例如,您可以使用 URL 路径引用页面中的图像文件或网站中其他位置处的页面的 URL。同样,Web 应用程序中的代码可以使用基于服务器的文件的物理文件路径对文件进行读写操作。ASP.NET 提供用于引用资源并确定应用程序中的页面或其他资源的路径的方法。指定资源的路径许多情况下,页面中的元素或控件必须引用外部资源,如文件。ASP.NET 允许您通过各种方法引用外部资源。所选方法取决于使用客户端元素还是服务器控件。客户端元素元素(不是页面中的服务器控件,而是客户端元素)以原样传递给浏览器。因此,从客户端元素中引用资源时,应根据 HTML 中 URL 的标 阅读全文
posted @ 2010-12-06 16:41 露水丛生 阅读(296) 评论(0) 推荐(0) 编辑
摘要: 网站在服务器磁盘上的物理路径: HttpRuntime.AppDomainAppPath虚拟程序路径: HttpRuntime.AppDomainAppVirtualPath任何于Request/HttpContext.Current等相关的方法, 都只能在有请求上下文或者页面时使用. 即在无请求上下文时,HttpContext.Current为null. 而上面提到的方法一直可用.对于全局Cache对象的访问亦然.==================================================================================示例:输出asp 阅读全文
posted @ 2010-12-06 16:36 露水丛生 阅读(298) 评论(0) 推荐(0) 编辑
摘要: 灵活的运用数据绑定操作 绑定到简单属性:%#UserName% 绑定到集合:asp:ListBox id="ListBox1" datasource='%# myArray%' runat="server" 绑定到表达式:%#(class1.property1.ToString() + "," + class1.property2.ToString())% 绑定到方法返回值:%# GetSafestring(str) % 绑定到Hashtable:%# ((DictionaryEntry)Container.DataItem).Key% 绑定到ArrayList:%# 阅读全文
posted @ 2010-12-06 16:09 露水丛生 阅读(180) 评论(0) 推荐(0) 编辑
摘要: sql = "select top "+PageSize.ToInt32() +" * from TABLE where id not in(select top " + Convert.ToInt32((pageno-1)*PageSize) +" id from TABLE)";示例: 阅读全文
posted @ 2010-12-06 11:54 露水丛生 阅读(904) 评论(0) 推荐(0) 编辑
摘要: 如果在Page.IsPostBack的页面中可以通过Request来进行.但是在!Page.IsPostBack页面,这样就无法传递参数,具体方法如下:引用用户控件页面html代码 1 后台代码来指定传给用户自定义控件的参数 protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //usercontrol... 阅读全文
posted @ 2010-12-01 17:35 露水丛生 阅读(1827) 评论(0) 推荐(1) 编辑
摘要: 后台代码:using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;u... 阅读全文
posted @ 2010-12-01 15:42 露水丛生 阅读(2303) 评论(3) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 20 下一页