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

文件上传代码(asp.net)

Boolean fileOK = false;
        String path = "D:\\";
        //string path = "1.gif";
      
            String fileExtension =
                System.IO.Path.GetExtension(Myfile.Value).ToLower();
            string str1=System.IO.Path.GetFileName(Myfile.Value);
            String[] allowedExtensions =
                { ".gif", ".png", ".jpeg", ".jpg" };
            string temp = System.IO.Path.GetTempPath();
            string temp1 = Server.MapPath("./");
            for (int i = 0; i < allowedExtensions.Length; i++)
            {
                if (fileExtension == allowedExtensions[i])
                {
                    fileOK = true;
                }
            }
       
        if (fileOK)
        {
            try
          &nbs


相关文档:

ASP.NET关闭当前窗口同时打开一个新窗口

首先,在pageload里写入以下代码:Response.Write("<script>window.opener=null;window.close();</script>");
其次,在head里写下如下JS代码: <script language="JavaScript">
<!--
function openwin() { window.open ("Default.aspx", "newwindow", "height=600, width=600, toolbar=no, menubar=n ......

asp.net中显示在线用户


asp.net中显示在线用户
private static System.Threading.Timer timer;
private const int interval = 1000 * 60 * 20;//检查在线用户的间隔时间
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
public Global()
{
Initialize ......

一个简单的ASP.NET +ACCESS 登录

首页:
<%@ 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 ......

ASP.NET FileUpload应用实例

Default.aspx:
<%@ 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" ......

ASP.NET取网页数据《数据采集》


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.IO;
using Sy ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号