现在“查询”是黑色粗体,别的项都是蓝色+下划线,点蓝色+下划线的要让自己变成黑色粗体,原来黑色粗体的变成蓝色+下划线
不管是用ASP.NET的label控件,还是用锚计,只要实现了都行。我用了几个label,改了字体成那样,结果它们没有click事件。

解决方案 »

  1.   

    linkbutton CSSCSS+Jquery<a> 直接设置下样式就行了
      

  2.   

    linkbutton 怎么让字不带下划线呀
      

  3.   

    别JQuery了,我就不信这么简单的功能直接都实现不了?
      

  4.   

    text-decoration:none;
    css 去下划线  。
    你可以给linkbutton 加个类属性。
      

  5.   

        protected void Page_Load(object sender, EventArgs e)
        {
            Session["currentBold"] = "LinkButton3";
            Session["linkFont"] = LinkButton1.Font;
            Session["boldFont"] = LinkButton3.Font;    }
        protected void LinkButton1_Click(object sender, EventArgs e)
        {
            LinkButton a = sender as LinkButton;
            if (a.ID == Session["currentBold"].ToString())
            {
                a.Font = Session["linkFont"] as Font;
            }
        }
    我想类似这么写,可是不行,怎么办?
      

  6.   

        protected void Page_Load(object sender, EventArgs e)
        {
            Session["currentBold"] = "LinkButton3";
    //         Session["linkFont"] = LinkButton1.Font;
    //         Session["boldFont"] = LinkButton3.Font;    }
        protected void LinkButton1_Click(object sender, EventArgs e)
        {
            LinkButton a = sender as LinkButton;
            if (a.ID == Session["currentBold"].ToString())
            {
                //a.Font = Session["linkFont"] as FontInfo;
                a.Font.Bold = false;
                a.ForeColor = new System.Drawing.Color();
                a.Font.Underline = true;
            }else
            {
                a.Font.Bold = true;
                a.ForeColor = Color.Black;
                a.Font.Underline = false;
            }
        }3个LinkButton都调用LinkButton1_Click这个函数