随笔分类 -  ASP.NET

摘要:public static string[] ShortUrl(string url){ //可以自定义生成MD5加密字符传前的混合KEY string key = "Leejor"; //要使用生成URL的字符 string[] chars = new string[]{ "a","b","c","d","e","f","g","h", "i","j","k&quo 阅读全文
posted @ 2012-04-19 17:26 javawebsoa 阅读(394) 评论(0) 推荐(0)
摘要:按照内容类型排列的 Mime 类型列表类型/子类型扩展名application/envoyevyapplication/fractalsfifapplication/futuresplashsplapplication/htahtaapplication/internet-property-streamacxapplication/mac-binhex40hqxapplication/msworddocapplication/msworddotapplication/octet-stream*application/octet-streambinapplication/octet-stream 阅读全文
posted @ 2012-03-17 18:25 javawebsoa 阅读(292) 评论(0) 推荐(0)
摘要:<%@ Page Language="C#" AutoEventWireup="true" CodeFile="js读取word.aspx.cs" Inherits="js读取word" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html 阅读全文
posted @ 2012-03-04 23:32 javawebsoa 阅读(367) 评论(0) 推荐(0)
摘要:using System; using System.IO; using System.Diagnostics; using Microsoft.Win32; using ICSharpCode.SharpZipLib.Checksums; using ICSharpCode.SharpZipLib.Zip; ///压缩、解压缩类 namespace DotNet.Utilities { public class SharpZip { public SharpZip() { } /// <summary> /... 阅读全文
posted @ 2012-03-01 10:31 javawebsoa 阅读(2364) 评论(0) 推荐(0)
摘要:using System; using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Drawing; public partial class Verify : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { Random random = new Random(); ... 阅读全文
posted @ 2012-02-28 10:39 javawebsoa 阅读(186) 评论(0) 推荐(0)
摘要:首先有个数据库表名为student字段为sno、sname、sagepublic static class Paging { static Paging() { } public static int PageBindRepeater(int curPage,int pageSize, Repeater rep,string strSql) { PagedDataSource pds = new PagedDataSource(); pds.DataSource = DbHelperSQL.GetTable(strSq... 阅读全文
posted @ 2012-02-27 14:27 javawebsoa 阅读(181) 评论(0) 推荐(0)
摘要:<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html x 阅读全文
posted @ 2012-02-26 20:12 javawebsoa 阅读(238) 评论(0) 推荐(0)
摘要:一、目前在ASP.NET中页面传值共有这么几种方式:1、表单提交, <form action= "target.aspx" method = "post" name = "form1"><input name = "param1" value = "1111"/><input name = "param2" value = "2222"/> </form> .... form1.submit(); .... 阅读全文
posted @ 2012-02-24 13:09 javawebsoa 阅读(112) 评论(0) 推荐(0)
摘要:平时使用时,了解一些常见的就可。Http 状态码一览表如下:1**:请求收到,继续处理100——客户必须继续发出请求101——客户要求服务器根据请求转换HTTP协议版本2**:操作成功收到,分析、接受200——交易成功201——提示知道新文件的URL202——接受和处理、但处理未完成203——返回信息不确定或不完整204——请求收到,但返回信息为空205——服务器完成了请求,用户代理必须复位当前已经浏览过的文件206——服务器已经完成了部分用户的GET请求3**:完成此请求必须进一步处理300——请求的资源可在多处得到301——删除请求数据302——在其他地址发现了请求数据303——建议客户访 阅读全文
posted @ 2012-02-24 13:05 javawebsoa 阅读(144) 评论(0) 推荐(0)
摘要:<%=%>里面放的变量名<% %>中间一般放函数或者方法,典型的asp程序写法。<%#%>这里是数据的绑定只能用在数据绑定控件中。<%@ %>表示:引用<%@ Page Language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html x 阅读全文
posted @ 2012-02-24 11:53 javawebsoa 阅读(381) 评论(0) 推荐(0)
摘要:不同点1. 创建方式不同一个是FILE->NEW->PROJECT->ASP.NET WEB APPLICATION另外一个是 FILE->NEW->WEBSITE2. 项目结构方式不同web application 会产生.csproj项目文件,来记录一些编译调试设置而 web site 就只是一个文件目录3. 发布两者都可以通过"publish"来发布, 这样就都会预编译, 生成对应的dll文件到bin目录下。网站的响应由dll和aspx页面合作完成.网站发布还可以无需bin目录, 将aspx页面和.cs的代码文件一起发布, 当请求页面的时 阅读全文
posted @ 2012-02-24 11:19 javawebsoa 阅读(207) 评论(0) 推荐(0)
摘要:using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Drawing; public partial c 阅读全文
posted @ 2012-02-01 13:22 javawebsoa 阅读(194) 评论(0) 推荐(0)
摘要:using System; using System.Net; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Ink; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Shapes; namespace MicroBlogForWP7.Classes. 阅读全文
posted @ 2012-01-10 10:32 javawebsoa 阅读(259) 评论(0) 推荐(0)
摘要:突然整理硬盘时找到了两年前写的一个网站,准备扔掉,但是还是把部分方法保留到博客吧!虽然现在对于自己已经用处不大,但是还是纪念一下!生成验证码:using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; u 阅读全文
posted @ 2012-01-04 16:38 javawebsoa 阅读(248) 评论(0) 推荐(0)
摘要:DataTableToJson:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.Serialization.Json; using System.Runtime.Serialization; using System.IO; using System.Web.Script.Serialization; using MicroBlog.Common.APIHelper; using System.Web; namespace Mi. 阅读全文
posted @ 2011-12-23 10:19 javawebsoa 阅读(356) 评论(0) 推荐(0)
摘要:<script type="text/javascript" language="javascript"> function Check() { var text = parent.document.getElementById('<%=HiddenField1.ClientID %>'); //如有母板页+pardent. ,普通取值不用加 if (confirm("您已运输" + text.value + "台")) { return true; } ... 阅读全文
posted @ 2011-11-10 20:44 javawebsoa 阅读(136) 评论(0) 推荐(0)
摘要:ASP.NET对请求处理的过程:当请求一个*.aspx文件的时候,这个请求会被inetinfo.exe进程截获,它判断文件的后缀(aspx)之后,将这个请求转交给 ASPNET_ISAPI.dll,ASPNET_ISAPI.dll会通过http管道(Http PipeLine)将请求发送给ASPNET_WP.exe进程,在ASPNET_WP.exe进程中通过HttpRuntime来处理这个请求,处理完 毕将结果返回客户端。inetinfo.exe进程:是www服务的进程,IIS服务和ASPNET_ISAPI.DLL都寄存在此进程中。ASPNET_ISAPI.DLL:是处理.aspx文件的win 阅读全文
posted @ 2011-09-10 18:47 javawebsoa 阅读(262) 评论(0) 推荐(0)
摘要://绑定Dropdownlist的时自定义组合字段后显示 ta.Fill(dtplan, sysUser.Number, sysUser.Corp.ID, string.Empty, DateTime.Now.AddDays(-15.00), DateTime.Now.AddDays(15.00), "0", "1", out obj); dtplan.Columns.Add("ZDY", System.Type.GetType("System.String"), "''+KHXM+ 阅读全文
posted @ 2011-08-17 11:49 javawebsoa 阅读(171) 评论(0) 推荐(0)
摘要:注册控件: <%@ Register TagPrefix="fup" Namespace="OboutInc.FileUpload" Assembly="FileUpload" %> 调用控件: <form runat="server" id="form1"> <input type="file" name="myFile1" /><br/> <input type="file" n 阅读全文
posted @ 2011-07-28 13:08 javawebsoa 阅读(254) 评论(0) 推荐(0)
摘要:static string GetIP() { Uri uri = new Uri("http://www.ikaka.com/ip/index.asp";); System.Net.HttpWebRequest req = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(uri); req.Method = "POST"; req.ContentType = "application/x-www-form-urlencoded"; req... 阅读全文
posted @ 2011-07-25 00:51 javawebsoa 阅读(308) 评论(0) 推荐(0)