惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Secure Thoughts
Recent Commits to openclaw:main
Recent Commits to openclaw:main
H
Heimdal Security Blog
SecWiki News
SecWiki News
H
Hacker News: Front Page
N
News | PayPal Newsroom
L
LINUX DO - 最新话题
N
News and Events Feed by Topic
TaoSecurity Blog
TaoSecurity Blog
AI
AI
C
Cybersecurity and Infrastructure Security Agency CISA
Scott Helme
Scott Helme
PCI Perspectives
PCI Perspectives
S
Securelist
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Cyberwarzone
Cyberwarzone
A
Arctic Wolf
Forbes - Security
Forbes - Security
T
Tor Project blog
Spread Privacy
Spread Privacy
WordPress大学
WordPress大学
I
Intezer
Martin Fowler
Martin Fowler
Help Net Security
Help Net Security
P
Proofpoint News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Cisco Talos Blog
Cisco Talos Blog
Latest news
Latest news
博客园 - 司徒正美
W
WeLiveSecurity
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V
V2EX
P
Palo Alto Networks Blog
Google DeepMind News
Google DeepMind News
IT之家
IT之家
阮一峰的网络日志
阮一峰的网络日志
V
Vulnerabilities – Threatpost
Jina AI
Jina AI
S
Security Affairs
Hacker News - Newest:
Hacker News - Newest: "LLM"
Simon Willison's Weblog
Simon Willison's Weblog
Project Zero
Project Zero
T
Threatpost
P
Privacy International News Feed
人人都是产品经理
人人都是产品经理
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Application and Cybersecurity Blog
Application and Cybersecurity Blog
博客园 - Franky
Hugging Face - Blog
Hugging Face - Blog
Apple Machine Learning Research
Apple Machine Learning Research

博客园 - TomSun

sql语句优化 页面生存周期 SQL Server 存储过程的分页 利用鼠标中键缩放图片 - TomSun - 博客园 不间断连续图片滚动效果的制作方法 - TomSun - 博客园 IE问题解决方法汇总 Calendar的相关问题. 无法打开注册表关键字错误----修改方法 JScript中正则表达函数的说明与应用 正则表达式语法 ASP生成柱型体,折线图,饼图源代码 - TomSun - 博客园 ASP必读[常见问题集] 常用SQL语句(不断更新) Javascript里类的思想(zz) - TomSun - 博客园 JS写的Cookie类 ASP调用系统ping命令 c#.net常用的小函数和方法集 XMLHTTP---介绍 ASP.net 验证码(C#)
N级无刷新连动菜单 - TomSun - 博客园
TomSun · 2005-09-05 · via 博客园 - TomSun

使用方法:

SqlConnection cnn;
   SqlCommand cmd;

   
   cnn 
= new SqlConnection(SqlHelper.connstr());
   cmd 
= cnn.CreateCommand();

   cnn.Open();
   
if (!Page.IsPostBack)
   
{
    SqlDataReader dr;
    
    cmd.CommandText 
= "SELECT MenuID,MenuName FROM Menu where ParentID=0 and MenuType='product'";
    dr 
= cmd.ExecuteReader();
    ddlPublishers.DataSource 
= dr;
    ddlPublishers.DataTextField 
= "MenuName";
    ddlPublishers.DataValueField 
= "MenuID";
    ddlPublishers.DataBind();
    dr.Close();
   }


      cmd.CommandText 
= "SELECT MenuID,ParentID,MenuName from Menu where ParentID>0 and MenuType='product'";
      SqlDataAdapter da 
= new SqlDataAdapter(cmd);
      DataSet ds 
= new DataSet("Titles");
      da.Fill(ds,
"titles");
      
      Array Data;
      Data 
= Array.CreateInstance(typeof(object),1,3);//1控制后续菜单的数量.
      Data.SetValue("ddlTitles",0,0);
      Data.SetValue(ds,
0,1);
      Data.SetValue(
"titles",0,2);
      ddlTitles.TableName 
= "titles";

      ddlPublishers.SlaveData 
= Data;
   
      cnn.Close();
  }