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

ASP.NETÖÐÔÚµã»÷°´Å¥ºó½«¸Ã°´Å¥ÉèΪ²»¿ÉÓõÄÈô¸ÉÇé¿ö

Ô­ÎÄ£ºÁõÎä|ASP.NETÖÐÔÚµã»÷°´Å¥ºó½«¸Ã°´Å¥ÉèΪ²»¿ÉÓõÄÈô¸ÉÇé¿ö
ÏîÄ¿Öо­³£³öÏÖÓû§Öظ´Ìá½»µÄÇé¿ö£¬ÎªÁË·ÀÖ¹ÕâÖÖÇé¿ö£¬×î³£Óõķ½·¨¾ÍÊÇÔÚÓû§µã»÷°´Å¥ºó½«¸Ã°´Å¥ÉèΪ²»¿ÉÓ㬱ÊÕßÔÚʵ¼Ê¿ª·¢µ±ÖÐÓöµ½Á˶àÖÖ²»Í¬µÄÇé¿ö£¬ÔÚ´Ë×ö¸öС½á£¬ÒÔ¹©²Î¿¼¡£
µÚÒ»ÖÖÇé¿öÊÇ·ÇsubmitÀàÐ͵İ´Å¥
ÕâÖÖÇé¿ö±È½Ï¼òµ¥£¬Ö»ÒªÔÚ¿Í»§¶ËÌí¼Óʼþ£¬½«°´Å¥ÉèΪ²»¿ÉÓþͿÉÒÔÁË¡£¿´ÏÂÃæµÄ´úÂ룺
ASP.NET-Code:
<form id="form1" runat="server">
        <asp:Label ID="lbl" runat="server"></asp:Label>
        <asp:Button ID="btn" runat="server" Text="Test"
            OnClick="btn_Click" OnClientClick="this.disabled=true"
            UseSubmitBehavior="false" />
</form>
C#-Code:
protected void btn_Click(object sender, EventArgs e)
{
    System.Threading.Thread.Sleep(1000);
    lbl.Text = DateTime.Now.ToString();
}
µÚ¶þÖÖÇé¿öÊÇsubmitÀàÐ͵İ´Å¥
´ËʱµÚÒ»ÖÖ·½·¨¾Í²»ÐÐÁË£¬°´Å¥±»ÉèΪDISABLEDÖ®ºó¾ÍÎÞ·¨Íê³ÉÌá½»£¬ÎÒÃÇ¿ÉÒÔÊʵ±Ð޸ĴúÂ룺
ASP.NET-Code:
<form id="form1" runat="server">
    <asp:Label ID="lbl" runat="server"></asp:Label>
    <asp:Button ID="btn" runat="server" Text="Test"
        OnClick="btn_Click"/>
</form>
C#-Code:
protected void Page_Load(object sender, EventArgs e)
{
    if (!Page.IsPostBack)
    {
        btn.OnClientClick = "this.disabled=true;" +
            GetPostBackEventReference(btn);
    }
}
ÓëµÚÒ»ÖÖ·½·¨²»Í¬µÄÊÇÎÒÃÇÔÚPage_LoadÖиø°´Å¥Ìí¼Ó¿Í»§¶Ëʼþ£¬²¢¸½¼ÓÁËGetPostBackEventReference¡£µ«ÕâÑù×ö»¹ÓиöȱÏÝ£¬ÔÚµÚÒ»Ìá½»»Ø·¢Íê³ÉÒÔºó£¬ÔÙµã»÷°´Å¥¾Í»áʧ°Ü£¬Òò´ËÎÒÃÇÐèҪȥµôif (!Page.IsPostBack)Õâ¾ä£¬Ò²¾ÍÊÇÿ´Î»Ø·¢¶¼Ò


Ïà¹ØÎĵµ£º

ASP.NETÍøÕ¾½¨ÉèÖ®´úÂë·ÖÀë

ÔÚÎÒÃÇ´«Í³µÄÍøÕ¾½¨ÉèÖÐͨ³£ÊÇÏÈÉè¼ÆÍøÕ¾Ò³Ã棬ÔÙÀûÓÿª·¢¹¤¾ß£¬ÔÚÍøÕ¾µÄ¿ò¼ÜÄÚ½øÐй¦ÄÜÉè¼Æ¡£ÕâÑùµÄÍøÕ¾½¨Éè´æÔںܶà±×¶Ë£¬ÆäÖÐ×îÍ»³öµÄȱµãÊDz»ÀûÓÚС×鹲ͬ¿ª·¢£¬¸÷»·½ÚÖ®¼äÒÀÀµÐÔÌ«Ç¿¡£
ÔÚASP.NETÖÐÎÒÃÇ¿ÉÒÔÀûÓúǫ́±àÂ룬°ÑHTMLÓû§½çÃæÉè¼Æ£¨ÑÕÉ«¡¢ÃÀѧµÈ£©ÓëÒ³Ãæ´úÂëÇø·Ö¿ªÀ´¡£ÕâÑù¾Í¿ÉÒÔ½â¾öÎÒÃÇС×éµÄ²¢Ðпª·¢ÎÊ ......

Asp.netÓëSQLÒ»Æð´ò°ü²¿Êð°²×°


Õû¸öSQLºÍAsp.net(vb.net)Ò»Æð´ò°üµÄÈ«¹ý³ÌдһÏ¡£
Ò».×¼±¸±ØÒªµÄÎļþ
1. SQL½Å±¾Îļþ£¬Éú³ÉÒÔºó°²×°¹ý³ÌÖÐÐèÒªµÄ±íºÍ´æ´¢¹ý³ÌµÈµÈ£»
Éú³ÉÖ®ºó£¬¾ÍÔÝʱ°ÑËüÃüÃûΪdb.sql(×¢Òâ´óСд)
2.LisenceFile.rtfµÄ°²×°Îļþ£¬ÒòΪÎÒµÄϵͳÊǸöÈ˵ģ¬¶øÇÒfreeµÄ£¬ËùÒÔ¾ÍûÓÐ×ö¡£Õâ¸öÒÔºóÒ²ÊÇÒªÓõ½µÄ¡£
¶þ.ÔÚ×Ô¼ºÏÖÓеÄÏîÄ¿Àïà ......

Asp.NetÖÐOnClientClickÓëOnClick (ת)

ÔÚweb¿ª·¢ÖÐ,¾­³£ÒªÓõ½¿Ø¼þµÄOnClientClickÓëOnClickʼþ.
Èç¹ûʹÓò»µ±,¾­³£»áÓöµ½Ò»Ð©ÒâÁÏÖ®ÍâµÄÊÂÇé·¢Éú,ÈÃÈËÃþ²»×ÅÍ·ÄÔ.ÏÂÃæ¾Í½«ÎÒµÄһЩСС×ܽáµÀÀ´:
Ê×ÏÈÎÒÃÇÒªÁ˽âÕâÁ½¸öʼþ:
OnClientClickÊÇ¿Í»§¶Ëʼþ·½·¨.Ò»°ã²ÉÓÃJavaScriptÀ´½øÐд¦Àí.Ò²¾ÍÊÇÖ±½ÓÔÚIE¶ËÔËÐÐ.Ò»µã»÷¾ÍÔËÐÐ.
OnClickʼþÊÇ·þÎñÆ÷¶Ëʼþ´¦Àí ......

ASP.Net 2.0&UP ViewState¶ªÊ§ÎÊÌâ

    Ã»ÓÐ×ÐϸÑо¿¹ýViewState£¬×î½ü³öÏÖµÄÎÊÌâÈÃÈËÍ·Í´²»ÒÑ¡£
    ViewState»áÔÚijЩÌض¨Çé¿öÏÂÏûʧ£¬ÇÒºÜÄѲ¶×½µ½¡£²éÁËһЩ¼¼ÊõÎÄÕ£¬¶¼ÊÇ˵ViewStateµÄ»úÖÆÊǽ«ÐÅÏ¢´æÔÚÒ³ÃæµÄhidden inputÀïÃ棬Ëƺõ²»¿ÉÄÜ´æÔÚÕâЩÎÊÌ⣬¸ø³öµÄÀíÓÉÎÞ·ÇÊÇÔÚij¸öµØ·½±»Ä³¸ö²»Ð¡ÐĵijÌÐòÔ±¸ø½ûµô»òÇå³ýµôÁ ......

Asp.Net ¼òµ¥¿¼Ìâ¹ÜÀíϵͳ


default.aspx.cs
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. ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ