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

¹ØÓÚASP.netÓëAJAXÓÃgridview½øʵÏÖÎÞˢв¢·ÖÒ³Ëæ±Ê

¿ª·¢»·¾³:WIN XP   VS2005
Êý¾Ý¿â:SQL server 2000
´Ë´¦²»¿¼ÂÇ°²È«ÎÊÌâ.
¾ßÌåÈçÏÂ:
Ê×ÏȽ¨Á¢Ò»¸öÊý¾Ý¿âºÍÒ»¸ö±í½á¹¹²¢ÔÚ±íÖÐÊäÈëһЩÊý¾ÝÒÔ±ã²âÊÔ:´Ë²½ÂÔ¹ý
´ò¿ªVS2005н¨Ò»¸öÍøÕ¾²¢Ìí¼ÓÒ»¸öHTMLÒ³
ÔÚĬÈϵÄDefault.aspxÖзÅÈëGridview¿Ø¼þÓÃÓÚÏÔʾÊý¾Ý
.cs´úÂë
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.Data.SqlClient;
public partial class _Default : System.Web.UI.Page
{
       public int j = 0;
    protected void Page_Load(object sender, EventArgs e)
    {
databind();
 }
/// <summary>
    /// ·ÖÒ³
    /// </summary>
    private void databind()
    {
        string connStrings = ConfigurationManager.ConnectionStrings["WSConStringSQL"].ToString();
        SqlConnection sqlconn = new SqlConnection(connStrings);
        SqlCommand sqlcom = new SqlCommand("Select * from TB_AdminUser ", sqlconn);
        
        DataSet ds = new DataSet();
  
        SqlDataAdapter da = new SqlDataAdapter(sqlcom);
        da.Fill(ds);
        PagedDataSource objPds = new PagedDataSource();
        objPds.DataSource = ds.Tables[0].DefaultView;
        objPds.AllowPaging = true;
        objPds.PageSize = 5;
        int CurPage;
      &


Ïà¹ØÎĵµ£º

ASP.NETÖиù¾ÝÄ£°åÉú³É¾²Ì¬Ò³!

  template.htmÄ£°åÒ³Ô´Âë:
1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2. <html xmlns="http://www.w3.org/1999/xhtml" >
3. <head>
4. <title ......

[ת]Asp.net 2.0Ò³ÃæÑùʽ¶ªÊ§×ܽá

תÔØ×Ô¡¾ÃÏ×ÓEÕ¡¿£ºhttp://blog.csdn.net/net_lover/archive/2007/08/27/1760521.aspx
¾­³£ÓÐÈËÓöµ½ASP.NET 2.0£¨ASP.NET 1.xÖпÉÄÜÊÇÓÐЧµÄ£©ÖÐCSSʧЧµÄÎÊÌ⣬ÏÖ½«Ö÷ÒªÔ­ÒòºÍ½â¾ö·½·¨ÂÞÁÐÈçÏ£º
1.CSSÎļþ·¾¶²»ÕýÈ·
    Õâ¸öÎÊÌâÊôÓÚWeb¿ª·¢ÖеĻù´¡ÎÊÌ⣬һ°ã²ÉÓÃÏà¶Ô·¾¶»á³öÏÖÕâÑùµÄÎÊÌ⣬»òÕßÑùÊ ......

ASP.NET³ÌÐòÖг£ÓõÄÈýÊ®ÈýÖÖ´úÂë

ASP.NET³ÌÐòÖг£ÓõÄÈýÊ®ÈýÖÖ´úÂë.......................................
1. ´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º
¡¡¡¡´«ËͲÎÊý£º
response.write("£¼script£¾window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)£¼/script£¾")
¡¡¡¡½ÓÊÕ²ÎÊý£º
string a = Request.QueryString("id");
......

asp.netʵÏÖÊ¡ÊÐÇø¼¶ÁªÏÂÀ­ÁÐ±í²¢±£´æ״̬

asp.netʵÏÖÊ¡ÊÐÁª¶¯²¢ÇÒ±£´æ״̬£¬ÊµÏÖÔ­Àí£º³õ´ÎʹÓÃC#´«Í³µÄDataBind½øÐÐÊý¾Ý°ó¶¨£¬Ñ¡ÔñÊ¡£¬Êкó½øÐÐajax·½Ê½¼ÓÔØϼ¶ÁÐ±í£¬²¢½«Ñ¡¶¨Öµ±£´æµ½HiddenÖУ¬µã»÷Ìá½»ºó¸ù¾ÝHiddenµÄÖµ½øÐÐÊ¡£¬Êа󶨣¬ÔÙ½«HiddenµÄÖµ¸³¸øDropDownListµÄSelectedValue£¬´Ó¶øʵÏÖ״̬µÄ±£´æ¡£
HTML´úÂë
<asp:HiddenField ID="HiddenField ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ