以前看UCHome进行二次开发的时候,看到他的菜单的实现,是通过数组存储每个菜单的样式。
现在在.NET开发项目时,想采用类似的方法。
</style>
<ul>
<li<%=ht["Index"]%>>首页</li>
<li<%=ht["News"]%>>公司新闻</li>
<li<%=ht["AboutUs"]%>>关于我们</li>
</ul>
{
protected Hashtable ht = new Hashtable();
public string strStyle = null ;
protected void Page_Load(object sender,EventArgs e)
ht[strStyle] = " class=\"b\"";
}