Asp.net(C#)¶àÎļþÉÏ´«
FileUp.aspx Ò³Ãæ
1<%@ Page language="c#" Codebehind="FileUp.aspx.cs" AutoEventWireup="false" Inherits="TestCenter.FileUp" %>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
3<HTML>
4 <HEAD>
5 <title>¶àÎļþÉÏ´«</title>
6 <script language="JavaScript">
7 function addFile()
8 {
9 var str = '<INPUT type="file" size="50" NAME="File">'
10 document.getElementById('MyFile').insertAdjacentHTML("beforeEnd",str)
11 }
12 </script>
13 </HEAD>
14 <body>
15 <form id="form1" method="post" runat="server" enctype="multipart/form-data">
16 <div align="center">
17 <h3>¶àÎļþÉÏ´«</h3>
18 <P id="MyFile"><INPUT type="file" size="50" NAME="File"></P>
19 <P>
20 <input type="button" value="Ôö¼Ó(Add)" onclick="addFile()">
21 <input onclick="this.form.reset()" type="button" value="ÖØÖÃ(ReSet)">
22 <asp:Button Runat="server" Text="¿ªÊ¼ÉÏ´«" ID="UploadButton"></asp:Button>
23 </P>
24 <P>
25 <asp:Label id="strStatus" runat="server" Font-Names="ËÎÌå" Font-Bold="True" Font-Size="9pt"
26 Width="500px" BorderStyle="None" BorderColor="White">&l
Ïà¹ØÎĵµ£º
SQLServer CodeSmith C#
bigint Int64   ......
web.config:
<system.net>
<mailSettings>
<smtp deliveryMethod="Network" from="chunyou128<you@163.com>">
&n ......
Êý¾Ý¿â²Ù×÷Àࣺ
¸´ÖÆ´úÂë ´úÂëÈçÏÂ:
/// <summary>
/// È¡µÃ×ÜÊý
/// </summary>
/// <returns></returns>
public string getTotal()
{
StringBuilder sb = new StringBuilder();
sb.Append("select count(*) total from Test");
DataTable dt = DBHelper.ExecuteDt(sb.ToString ......
//ƽ³£µ÷ÓÃjavascript·½·¨
ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert'Weclome!!!');</script>");
±³¾°²»Îª°×É«µÄ·½·¨£º
Page.ClientScript.RegisterStartupScript(Page.GetType(), "message", "<script language='javascript' defer>alert('Ìí¼Óʧ°Ü£¬ÇëÁªÏµ¼¼ÊõÔ±£¡') ......
ÏÖÔÚµÄÆóÒµ¼¶¿ª·¢ÏîÄ¿£¬ÌرðÊÇÍøÕ¾Ò»°ã¶¼»áÓõ½log¹¦ÄÜ£¬ÏëÏë´ó²¿·Ö»áÓÃEnterprise Logging Application Block µÄ¹¦ÄÜ »òÕß×Ô¼ºÐ´Ò»¸ö×é¼þ£¬¼Ç¼ϵͳÈÕ־ʼþ£¬¸üºÃµÄ¸ú×ÙÁ˽âϵͳÔËÐÐÇé¿ö, ÏÖÓÃASP.NET MVC µÄ¹ýÂËÊôÐÔʵÏÖlog¹¦ÄÜ£¡
ASP.NET MVCµÄfilter ÊÇÒ»¸öÊôÐÔ£¬¿ÉÒÔÓ¦Ó ......