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

asp.net¶¯Ì¬Éú³ÉTreeView

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 left : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
       GetTreeView();
    }
    private void GetTreeView()
    {
        try
        {
            string connectionstring = "Server=(local);uid=sa;pwd=123456;database=web";//Á¬½ÓSQLÊý¾Ý¿â
            SqlConnection conn = new SqlConnection(connectionstring);
            string sql = "select * from menu where menu_level=1 and parent_id =0";//²éѯһ¼¶½Úµã
            SqlDataAdapter adapter = new SqlDataAdapter(sql, conn);
            DataSet ds1 = new DataSet();
            adapter.Fill(ds1, "temp");
            DataTable table1 = ds1.Tables["temp"];//°Ñ¶ÁÈ¡µÄÊý¾Ý·ÅÈëDATATABLEÖÐ
            TreeView1.Nodes.Clear();//½¨Á¢¸ù½Úµã£¬±éÀú¡£
            foreach (DataRow dr1 in table1.Rows)
            {
                TreeNode root = new TreeNode();
  &


Ïà¹ØÎĵµ£º

Asp.net treeviewʵÏÖÎÞÏÞ¼¶Ê÷

×î½üÑо¿ÁËÒ»ÏÂtreeview£¬·¢ÏÖÓÐÁ½ÖÖʵÏÖÎÞÏÞ¼¶Ê÷µÄ·½·¨£¬ÎÄ×Ö²»Ïë¶àд£¬Ö±ÈëÖ÷Ìâ¡£
ÏÈ¿´¿´Êý¾Ý¿â±íµÄÉè¼Æ£¬Êý¾Ý±íÖ÷Òª°üÀ¨ID£¬Name£¬ParentIDÕâÈýÏÆäÖÐIDÊÇÖ÷¼ü£¬ParentID¶ÔÓ¦½ÚµãµÄ¸¸½Úµã£º
·½·¨Ò»£ºÓõݹé±éÀúÊý¾Ý£¬²¢½«½ÚµãÖð¸öÌí¼Óµ½treeviewÖÐÈ¥¡£
1.ÏȽøÐÐÊý¾Ý¿âÁ¬½ÓºÍÊý¾ÝµÄ¶ÁÈ¡£¬²¢½«¸ù½ÚµãÏÈÌí¼Ó½øtreeview ......

ÔÚ ASP.NET MVC ÏîÄ¿ÖÐʹÓà WebForm

ASP.NET MVCºÍWebForm¸÷Óи÷µÄÓŵ㣬ÎÒÃÇ¿ÉÄÜÐèҪͬʱʹÓÃASP.NET MVCºÍWebForm¡£±¾ÎĽéÉÜÁËÈçºÎÔÚASP.NET MVCÏîÄ¿ÖÐʹÓÃWebForm¡£
Ê×ÏÈн¨Ò»¸öÃûΪWebFormsµÄÎļþ¼ÐÓÃÓÚ´æ·ÅWebForm£¬²¢Ìí¼ÓÒ»¸öWeb´°ÌåÎļþDemo.aspx×÷ΪÑÝʾ¡£
Demo.aspx¾Í¼òµ¥µÄÊä³öÒ»¾ä»°“It’s a WebForm.”
¹Ø¼ü²½ÖèÔÚÓÚ·ÓÉÉèÖá ......

asp.net template item Àï id ÔÚpostbackºó ²»Ò»ÖÂ

֮ǰÓöµ½Ò»¸öºÜÓôÃÆµÄÎÊÌ⣬ ´ó¸Å¾ÍÊÇdagagridÀïÓ¦ÓÃÁËÒ»¸öÐÐÊÇcheckbox£¬ ½á¹ûËÀ»îµãcheck all£¬ submitÒÔºó Response.FormÀïµÄidºÍ FindControlÀïÕÒµ½µÄ²»Ò»ÖÂÁË.
½áÂÛÊÇ:
datagrid °ó¶¨ÒÔºóÔÙÒ²²»Òª¶¯ÁË! ·ñÔò ǰ̨id ÔÙpostback µÄʱºòÊDz»Ò»Ö嵀 ......

ASP.NET vs. PHP£¬Äĸö¸ü¿ì£¿


ASP.NET vs. PHP£¬Äĸö¸ü¿ì£¿
http://www.infoq.com/cn/news/2009/09/aspnet-php-benchmark
×÷Õß ÕÔ劼 ·¢²¼ÓÚ 2009Äê9ÔÂ15ÈÕ ÉÏÎç5ʱ33·Ö
ÉçÇø .NET Ö÷Ìâ ÐÔÄܺͿÉÉìËõÐÔ ±êÇ© PHP, ASP.NET
½áÂÛ£º
ÎÒÃÇ¿ÉÒÔÕâôÈÏΪ£¬¶ÔÓÚ´¿´âµÄPHPÖ´ÐÐÐÔÄÜÀ´Ëµ£¬LinuxºÍWindowsÏà²î ......

Asp.net¼¼ÇÉ£ºgridview»ñÈ¡µ±Ç°ÐÐË÷ÒýµÄ·½·¨

ÔÚÓÃGridView¿Ø¼þʱ£¬ÎÒÃǾ­³£»áÅöµ½»ñÈ¡µ±Ç°ÐеÄË÷Òý£¬Í¨¹ýË÷Òý½øÐÐÐí¶à²Ù×÷¡£ÀýÈ磬¿ÉÒÔ»ñµÃµ±Ç°ÐÐijһ¸ö¿Ø¼þÔªËØ£»ÉèÖÃÄ³Ò»ÔªËØµÄÖµµÈµÈ¡£
ÏÂÃæ½áºÏʵÀý½éÉܼ¸ÖÖ»ñµÃGridViewµ±Ç°ÐÐË÷ÒýÖµµÄ·½·¨¡£
ʵÀý£º
¢Ù Ä¿µÄ£º»ñÈ¡GridViewÖÐRowCommandµÄµ±Ç°Ë÷ÒýÐС£
¢Ú Ç°Ì¨Ò³Ãæ£ºÔÚGridViewÖÐÌí¼Óһģ°æÁУ¬ÀïÃæÌí¼ÓÒ»¸öLink ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ