在ASP.Net中禁用选项卡

在ASP.Net中禁用选项卡,asp.net,tabs,Asp.net,Tabs,我们有一个用CSS呈现的选项卡,使用 渲染后,我们有以下内容: <div class="innertabs" id="tabbar"> <ul> <li id="ctl00_ContentPlaceHolderMain_SIS_ICMS_IntranetWeb_Modules_Person_TabCasePlanYJ_CasePlan_TabInterventionsYJ_liOrders" class="" disabled="disabled">

我们有一个用CSS呈现的选项卡,使用
  • 渲染后,我们有以下内容:

    <div class="innertabs" id="tabbar">
    <ul>
        <li id="ctl00_ContentPlaceHolderMain_SIS_ICMS_IntranetWeb_Modules_Person_TabCasePlanYJ_CasePlan_TabInterventionsYJ_liOrders" class="" disabled="disabled">
            <a id="ctl00_ContentPlaceHolderMain_SIS_ICMS_IntranetWeb_Modules_Person_TabCasePlanYJ_CasePlan_TabInterventionsYJ_lnkOrders" href="javascript:__doPostBack('ctl00$ContentPlaceHolderMain$SIS_ICMS_IntranetWeb_Modules_Person_TabCasePlanYJ_CasePlan$TabInterventionsYJ$lnkOrders','')">Orders</a>
        </li>
        <li id="ctl00_ContentPlaceHolderMain_SIS_ICMS_IntranetWeb_Modules_Person_TabCasePlanYJ_CasePlan_TabInterventionsYJ_liProgramActivityList" class="" disabled="disabled">
            <a id="ctl00_ContentPlaceHolderMain_SIS_ICMS_IntranetWeb_Modules_Person_TabCasePlanYJ_CasePlan_TabInterventionsYJ_lnkProgramActivityList" href="javascript:__doPostBack('ctl00$ContentPlaceHolderMain$SIS_ICMS_IntranetWeb_Modules_Person_TabCasePlanYJ_CasePlan$TabInterventionsYJ$lnkProgramActivityList','')">Program/activity list</a>
        </li>
        <li id="ctl00_ContentPlaceHolderMain_SIS_ICMS_IntranetWeb_Modules_Person_TabCasePlanYJ_CasePlan_TabInterventionsYJ_liProgramActivityDetail" class="current">
            <a id="ctl00_ContentPlaceHolderMain_SIS_ICMS_IntranetWeb_Modules_Person_TabCasePlanYJ_CasePlan_TabInterventionsYJ_lnkProgramActivityDetail" href="javascript:__doPostBack('ctl00$ContentPlaceHolderMain$SIS_ICMS_IntranetWeb_Modules_Person_TabCasePlanYJ_CasePlan$TabInterventionsYJ$lnkProgramActivityDetail','')">Program/activity details</a>
        </li>
    
    
    
    </ul>
    

    有没有办法使其不可单击?

    啊,列表项被禁用,而不是子控件


    尝试在liProgramActivityList的子控件中循环,例如liProgramActivityList.控件,并禁用所有这些控件。

    此tabstrip来自哪个控件库(custom、telerik等)。我认为它是custom,而且看起来
  • 是用CSS呈现的,看起来像标签。但是这仍然不允许我移动到禁用的标签吗?我们希望保留当前启用的选项卡-现在允许单击任何其他选项卡。实际上,谢谢!我知道你在做什么。孩子是一个链接按钮,我们已经禁用了它。作品谢谢
    private void TabCasePlanInterventionsProgramActivityDetails_OnCreateProgram()
        {
        //    ShowProgramActivityDetailPanel();
        //    TabCasePlanInterventionsProgramActivityList.Visible = false;
        //    TabCasePlanInterventionsProgramActivityDetail.Visible = true;
        //    liProgramActivityList.Disabled = true;
        //    liOrders.Disabled = true;
    
            ShowProgramActivityDetailPanel();
            TabCasePlanInterventionsProgramActivityList.Visible = false;
            TabCasePlanInterventionsProgramActivityDetail.Visible = true;
            TabCasePlanInterventionsOrders.Visible = false;
            //TabCasePlanInterventionsProgramActivityList.PopulateForm();
    
            liProgramActivityList.Attributes.Add("class", "");
            liProgramActivityDetail.Attributes.Add("class", "current");
            liOrders.Attributes.Add("class", "");
            liProgramActivityList.Disabled = true;
            liOrders.Disabled = true;
    
    
            if (CurrentAssessment!= null)
            {
                TabCasePlanInterventionsProgramActivityDetail.CurrentAssessment = CurrentAssessment; 
            }
    
            TabCasePlanInterventionsProgramActivityDetail.ChangeToCreateMode();   
    
            if (CurrentCasePlan!= null)
            {
                TabCasePlanInterventionsProgramActivityDetail.CurrentCasePlan = CurrentCasePlan;
                TabCasePlanInterventionsProgramActivityDetail.ChangeToCreateMode();   
            }
        }