Asp.net treeviewʵÏÖÎÞÏÞ¼¶Ê÷ʵÏÖ´úÂë
×î½üÑо¿ÁËÒ»ÏÂtreeview£¬·¢ÏÖÓÐÁ½ÖÖʵÏÖÎÞÏÞ¼¶Ê÷µÄ·½·¨£¬ÎÄ×Ö²»Ïë¶àд£¬Ö±ÈëÖ÷Ìâ¡£
ÏÈ¿´¿´Ð§¹ûͼ£º
ÏÈ¿´¿´Êý¾Ý¿â±íµÄÉè¼Æ£¬Êý¾Ý±íÖ÷Òª°üÀ¨ID£¬Name£¬ParentIDÕâÈýÏÆäÖÐIDÊÇÖ÷¼ü£¬ParentID¶ÔÓ¦½ÚµãµÄ¸¸½Úµã£º
·½·¨Ò»£ºÓõݹé±éÀúÊý¾Ý£¬²¢½«½ÚµãÖð¸öÌí¼Óµ½treeviewÖÐÈ¥¡£
1.ÏȽøÐÐÊý¾Ý¿âÁ¬½ÓºÍÊý¾ÝµÄ¶ÁÈ¡£¬²¢½«¸ù½ÚµãÏÈÌí¼Ó½øtreeviewÖУ¬²¢ÀûÓõݹégetTreeView£¨£©ÊµÏÖÊý¾ÝµÄ±éÀúºÍÌí¼Ó£º
¸´ÖÆ´úÂë ´úÂëÈçÏÂ:
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
TreeNode nodeCategory ;
connection conn = new connection();
List<Category> category = conn.getCategory();
Stack<Category> storeCategory = new Stack<Category>();
storeCategory.Push(category[0]);
nodeCategory = new TreeNode(category[0].Name.Trim(), category[0].Id.Trim());
TreeView1.Nodes.Add(nodeCategory);
getTreeView(storeCategory, category, nodeCategory);
}
}
2.Êý¾Ý±éÀúµÄµÝ¹éº¯Êý£¬±È½Ï¼òµ¥¾Í²»¶à˵ÁË¡£
¸´ÖÆ´úÂë ´úÂëÈçÏÂ:
public void getTreeView(Stack<Category> categoryStack,List<Category> categoryList,TreeNode e)
{
Category tmp;
if(categoryStack.Count>0)
{
tmp=categoryStack.Pop();
for(int i=0;i<categoryList.Count;i++)
if(categoryList[i].ParentId.Trim()==tmp.Id.Trim())
{
categoryStack.Push(categoryList[i]);
TreeNode childNote = new TreeNode(categoryList[i].Name.Trim(), categoryList[i].Id.Trim());
e.ChildNodes.Add(childNote);
getTreeView(categoryStack, categoryList, childNote);
}
}
}
·½·¨¶þ£ºÓÃTreeView1_TreeNodePopulate(object sender, TreeNodeEventArgs e)ʼþÏìÓ¦À´Öð¸ö¶ÁÈ¡×ӽڵ㡣
1.µÚÒ»²½»ù±¾ºÍÉÏÒ»·½·¨µÄµÚÒ»²½Ò»Ö£¬Ö»ÊÇÒª½«½ÚµãµÄÉèÖÃΪ²»Õ¹¿ª¡£
¸´ÖÆ´úÂë ´úÂëÈçÏÂ:
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
TreeNode nodeCategory ;
connection conn = new connection();
List<Category> category = conn.getCategory();
nodeCategory = new TreeNode(category[0].Name.Trim(), category[0].Id.Trim());
nodeCategory.PopulateOnDemand = true;
nodeCategory.Collapse();
Ïà¹ØÎĵµ£º
1. Get(¼´Ê¹ÓÃQueryStringÏÔʽ´«µÝ)
·½Ê½£ºÔÚurlºóÃæ¸ú²ÎÊý¡£
Ìص㣺¼òµ¥¡¢·½±ã¡£
ȱµã£º×Ö·û´®³¤¶È×Ϊ255¸ö×Ö·û£»Êý¾Ýй©ÔÚurlÖС£
ÊÊÓÃÊý¾Ý£º¼òµ¥¡¢ÉÙÁ¿¡¢¹Ø¼üµÄÊý¾Ý¡£
ÊÊÓ÷¶Î ......
asp.net Ò³ÃæÑÓʱÎåÃ룬Ìøתµ½ÁíÍâµÄÒ³ÃæµÄʵÏÖ´úÂë¡£
--ǰ̨
¸´ÖÆ´úÂë ´úÂëÈçÏÂ:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Successed.aspx.cs" Inherits="Biz_Order_Successed" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xht ......
WSDL£ºÊÇÒ»¸öÓÃÀ´ÃèÊöWeb·þÎñºÍ˵Ã÷ÈçºÎÓëWeb·þÎñͨÐŵÄXMLÓïÑÔ¡£ ÔõÑùÏò±ðÈ˽éÉÜÄãµÄWeb serviceÓÐʲô¹¦ÄÜ£¬ÒÔ¼°Ã¿¸öº¯Êýµ÷ÓÃʱµÄ²ÎÊýµÈµÈ¡£
web·þÎñ£º½øÐÐwebÉÏÊý¾Ý½»»»µÄ·½·¨¡£Äܹ»ÒÔ´¿xml·½Ê½Í¨ÐÅ¡£
SOAP£º¼òµ¥¶ÔÏó´æÈ¡ÐÒé¡£¿É¿´×öxml·½ÑÔ£» ÒÔSOAPÐÅ·âÀ´´«µÝºÍÏìÓ¦Îı¾£¨°üº¬£ºÊײ¿¡¢Ö÷Ì壩HTTP P ......
asp.net×Ö·û´®½ØȡʵÏÖ´úÂ룬ÐèÒªµÄÅóÓÑ¿ÉÒԲο¼Ï¡£
1£¬°Ñ´úÂë·ÅÔÚsqlhelperÖС£
¸´ÖÆ´úÂë ´úÂëÈçÏÂ:
#region ½ØÈ¡×Ö·û´®
/// <summary>
/// ½ØÈ¡×Ö·û´®
/// </summary>
/// <param name="str_value"></param>
/// <param name="str_len"></param>
/// <returns&g ......
private void btnUploadPicture_Click(object sender, System.EventArgs e) { //¼ì²éÉÏ´«ÎļþµÄ¸ñʽÊÇ·ñÓÐЧ if(this.UploadFile.PostedFile.ContentType.ToLower().IndexOf("image") < 0) { Response.Write("ÉÏ´«Í¼Æ¬¸ñʽÎÞЧ£¡"); return; } //Éú³ÉÔͼ Byte[] oFileByte = new byte[this.UploadFile.PostedFile.Conte ......