Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

asp.net¶ÁÈ¡EXcelµÄСÌÖÂÛ

ÔÚCSÎļþÖУ¬Ê×ÏÈÔÚ¶¥²¿ÒýÈë²Ù×÷ExcelÊý¾ÝµÄÃüÃû¿Õ¼ä
using System.Data.OleDb;
Õýʽ´úÂëÈçÏ£º
    private void Button_Click(object sender, System.EventArgs e)
    {
        string thefullname = this.uploadFile.PostedFile.FileName;//»ñÈ¡ÍêÕû·¾¶
        ClientScriptManager csm = Page.ClientScript;
        if (thefullname == "")
        {
            csm.RegisterStartupScript(GetType, "Error", "alert('ÇëÑ¡ÔñÒªÉÏ´«µÃExcelÎļþ');", true);
            return;
        }
        int fileLength = this.uploadFile.PostedFile.ContentLength;
        if (fileLength > 512000)
        {
            csm.RegisterStartupScript(GetType, "Error", "alert('ÎļþÒѳ¬¹ý500K£¬ÎÞ·¨ÉÏ´«£¡');", true);
            return;
        }
        FileInfo info = new FileInfo(thefullname);
        string fileExt = info.Extension;
        if (fileExt.ToLower() != ".xls")
        {
            csm.RegisterStartupScript(GetType, "Error", "alert('²»ÊÇExcelÎļþ£¬ÇëʹÓÃÕýÈ·µÄÎļþ¸ñʽ£¡');", true);
            return;
        }
        string uploadPath = Page.MapPath(@"uploadfile\report.xls");
    


Ïà¹ØÎĵµ£º

ASP.NET Ìî³ä TreeView Web ·þÎñÆ÷¿Ø¼þÖеÄÊ÷½Úµã


      TreeView Web ·þÎñÆ÷¿Ø¼þ¿ÉÒÔÏÔʾ¸÷ÖÖ²»Í¬ÀàÐ͵ÄÊý¾Ý£º¿Ø¼þÖÐÒÔÉùÃ÷·½Ê½Ö¸¶¨µÄ¾²Ì¬Êý¾Ý£»°ó¶¨µ½¸Ã¿Ø¼þµÄÊý¾Ý£»»òΪÏìÓ¦Óû§²Ù×÷¶ø¶¯Ì¬Ìí¼Óµ½ TreeView ¿Ø¼þÖеÄÊý¾Ý¡£
Ò»¡¢ÏÔʾ¾²Ì¬Êý¾Ý
×î¼òµ¥µÄÊý¾Ý¼Ü¹¹ÊÇÉùÃ÷ÐÔ¾²Ì¬Êý¾Ý¡£ÈôҪʹÓÃÉùÃ÷ÐÔÓï·¨ÏÔʾ¾²Ì¬Êý¾Ý£¬Çë´´½¨Ò»¸ö TreeView ¿Ø¼þ× ......

asp.netÖÐSystem.DateTime.Now.ToString()µÄһЩÓ÷¨

//2007Äê4ÔÂ24ÈÕ
     this.TextBox6.Text = System.DateTime.Now.ToString("D");
     //2007-4-24
     this.TextBox7.Text = System.DateTime.Now.ToString("d");
     //2007Äê4ÔÂ24ÈÕ 16:30:15
     this. ......

21ÌìѧͨASP.NET

¡¡¡¡
¡¡¡¡ÄÚÈݼò½é
¡¡¡¡±¾ÊéÊÇASP.NETµÄÈëÃŽ̡̳£ASP.NET 3.5ÊÇ΢Èí¾«ÐÄ´òÔìµÄÐÂÐ͵ÄÈí¼þ¿ª·¢Æ½Ì¨¡£¸Ãƽ̨ÊÇÔÚ.NET2.0µÄ»ù´¡ÉÏ·¢Õ¹¶øÀ´£¬ÔÚʵ¼Ê¿ª·¢ÖÐÓй㷺ӦÓᣱ¾ÊéÒ»¹²·ÖΪËÄÆª£¬µÚһƪÖ÷Òª½²½âÁËASP.NEµÄÈëÃÅ»ù´¡ÖªÊ¶£¬ÄÚÈݰüÀ¨´î½¨ASP.NET¿ª·¢»·¾³¡¢C#ÓïÑÔ»ù´¡¡¢ÃæÏò¶ÔÏóµÄ³ÌÐòÉè¼Æ¡¢ASP.NETÄÚÖöÔÏó¡¢ASP.NETҳà ......

¹ØÓÚasp.netÒ»ÖÖʵÏÖÑéÖ¤ÂëµÄ¼òµ¥·½·¨

ÏÂÃæÊÇÓÃÀ´²âÊÔÑéÖ¤ÂëµÄǰ̨ÏÔʾ´úÂ룺ÆäÖнű¾º¯ÊýchangeµÄ×÷ÓÃÊÇʵÏÖ“¿´²»Çå³þ£¬»»Ò»ÕŵÄЧ¹û”
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CheckTest.aspx.cs" Inherits="SecurityCodeTest.CheckTest" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http ......

asp.netС֪ʶ


ºǫ́¸ø¿Ø¼þÌí¼Ójs·½·¨
this.btnOK.Attributes["onclick"] = "javascript:return confirm(\"È·¶¨±£´æ£¿\");";
»òÕß
<mce:script type="text/javascript"><!--
function shijian()
{
return confirm(\"È·¶¨±£´æ£¿\");
}
// --></mce:script>
this.btnOK.Attributes["onclick"] = "return sh ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ