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

asp.netÉú³É¾²Ì¬Ò³Ãæ·½·¨ÊµÀý,°üÀ¨datalist

Ê×ÏȽ¨Ò»¸öÏëÒªÉú³É¾²Ì¬Ò³µÄaspxÒ³DynamicPage.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DynamicPage.aspx.cs" Inherits="DynamicPage" %>
<!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>
    ÎÒÊǸö¶¯Ì¬Ò³
    <br />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="testid"
        DataSourceID="SqlDataSource1" Width="386px">
        <Columns>
          <asp:BoundField DataField="testid" HeaderText="testid" InsertVisible="False" ReadOnly="True"
            SortExpression="testid" />
          <asp:BoundField DataField="testname" HeaderText="testname" SortExpression="testname" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:testConnectionString %>"
        SelectCommand="SELECT [testid], [testname] from [test_table]"></asp:SqlDataSource>
  </div>  
  </form>
</body>
</html>
È»ºó½¨Ò»¸öÓÃÓÚÉú³ÉÆäËüÒ³ÃæµÄDefault.aspx,²¢ÇÒÍÏ·ÅÒ»¸ö°´Å¥£¬È»ºóÔÚ´úÂëÒþ²ØÎļþÖмüÈëÈçÏ´úÂ룺
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web


Ïà¹ØÎĵµ£º

ASP.NET ÑÝÁ·£ºÑéÖ¤ Web ´°ÌåÒ³ÖеÄÓû§ÊäÈë


      ±¾ÑÝÁ·²ûÊÍÈçºÎʹÓà ASP.NET ÑéÖ¤³ÌÐò¿Ø¼þ¼ì²éÍøÒ³ÖеÄÓû§ÊäÈë¡£ÄúÎÞÐè´úÂë¾Í¿ÉÒÔʹÓÃijЩ×Ô¶¯Ö´ÐÐËùÓмì²éµÄ¿Ø¼þ¡£´ËÍ⣬Äú»¹½«Í¨¹ý±àд´úÂë´´½¨Ò»¸ö×Ô¶¨ÒåÑéÖ¤³ÌÐò£¬¸Ã¹ý³Ì½«ÑÝʾÈçºÎ½«Äú×Ô¼ºµÄÂß¼­Ìí¼Óµ½Ò³µÄÑéÖ¤¿ò¼ÜÖС£×îºó£¬Äú½«Ñ§Ï°ÈçºÎ¸ù¾ÝÓû§ÔÚÒ³ÉÏËù×öµÄÑ¡ÔñÓÐÌõ¼þµØÑéÖ¤Óû§ ......

ASP.NETµÄºóÖôúÂëÖе¯³ö¿Í»§¶ËµÄ¶Ô»°¿ò

1. Response.Write("<script>alert('µ¯¶ÔµÄÄÚÈÝ£¡£¡');</script>");   //µ¯³öʱҳÃæΪ¿Õ°×É«,×îºÃ²»ÒªÓÃÕâÒ»ÖÖ
2. Page.ClientScript.RegisterStartupScript(this.GetType(),"","<script>alert('µ¯¶ÔµÄÄÚÈÝ£¡£¡');</script>"); //ûÓÐÓõ½ÎÞˢпؼþʱÓÃ
3. ScriptManager.RegisterCli ......

ASP.NETµÄÍêÈ«¿ÉÊÓ»¯Ajax¿ª·¢²âÊÔ

ÎÒ×Ô¼ºÐ´¸ö¿ìËÙÈëÃŵÄASP.NETµÄÍêÈ«¿ÉÊÓ»¯Ajax¿ª·¢£¬ÓÃVisual studio2008ÀïÃæ×Ô´øµÄAJAX Extensions¿Ø¼þ¡£
1£¬Ê×ÏÈ£¬ÍùÒ³ÃæÀïÃæקһ¸öScriptManager¿Ø¼þ£¨×¢²á½Å±¾£¬±ØÐëÔÚËùÓзþÎñÆ÷¿Ø¼þ֮ǰ³öÏÖ£©
2£¬ÍùÒ³ÃæÀïקһ¸öUpdatePanel¿Ø¼þ£¨¾Ö²¿Ë¢Ð¿ؼþ£©
3£¬ÔÚUpdatePanel¿Ø¼þµÄÃæ°åÀקһ¸öTextBox¿Ø¼þTextBox1ºÍÒ»¸öLa ......

ASP.NET Ajax Video Notes

ASP.NET Ajax Videoѧϰ±Ê¼Ç
5. Make Client-Side Network Callbacks with ASP.NET AJAX?
Notes:
ÔÚ<ScriptManager>ÖÐÌí¼Ó<Services>
4. Implement Dynamic Partial-Page Updates with ASP.NET AJAX?
Notes:
UpdatePanel¿ÉÒÔÍê³É²¿·ÖÒ³ÃæµÄ¸üÐÂ
Èç¹ûButtonÔÚUpdatePanelÖУ¬¼´Ê¹ÔÚPageLoad()Öаüº¬¸üÐÂË ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ