易截截图软件、单文件、免安装、纯绿色、仅160KB

asp.net为图片添加文字水印

<%@ 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 xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div>
   上传图片:<asp:FileUpload ID="uploadImage" runat="server" />
<br />
 生成图片宽度:<asp:TextBox ID="TextBox1" runat="server">500</asp:TextBox>
<br />
 生成图片高度:<asp:TextBox ID="TextBox2" runat="server">500</asp:TextBox>
<br />
每行显示字符数:<asp:TextBox ID="TextBox4" runat="server">20</asp:TextBox>
<br />
  水印文字:<asp:TextBox ID="TextBox3" runat="server" TextMode="MultiLine">在人生的道路上,如果你没有耐心去等待成功的到来,那么你只好用一生的时间去等待失败!</asp:TextBox>
<br />
   <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="提交" />
<br />
</div>
</form>
</body>
</html>

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
HttpPostedFile hpf = uploadImage.PostedFile;
//取得文件名,不含路径
char[] splitChar = { '\\' };
string[] FilenameArray = hpf.FileName.Split(


相关文档:

Jquey Ajax访问asp.net后台代码

            $.ajax({
                type: "POST",   //访问WebService使用Post方式请求
             ......

asp.net面试题收集 你都会了吗

1.new有几种用法
第一种:new Class();
第二种:覆盖方法
public new XXXX(){}
第三种:new 约束指定泛型类声明中的任何类型参数都必须有公共的无参数构造函数。
2.如何把一个array复制到arrayList里
foreach( object o in array )arrayList.Add(o);
3.datagrid.datasous ......

Asp.Net MVC中身份认证和授权

MVC自带的ActionFilter
在Asp.Net WebForm的中要做到身份认证微软为我们提供了三种方式,其中最常用的就是我们的Form认证,需要配置相应的信息。例如下面的配置信息:
<authentication mode="Forms">
<forms loginUrl="Login.aspx" defaultUrl="Default.aspx" protection="All" />
</authenticati ......

asp.net的一个dbhelper类

using System;
using System.Collections;
using System.Collections.Specialized;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Collections.Generic;
using System.Text;
namespace Maticsoft.DBUtility
{
     /// <summary>
  ......

ASP.NET 檔案下載

//TransmitFile实现下载
    protected void Button1_Click(object sender, EventArgs e)
    {
        /*
        微软为Response对象提供了一个新的方法TransmitFile来解决使用Respo ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号