在ASP.Net中禁用选项卡
我们有一个用CSS呈现的选项卡,使用在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">
渲染后,我们有以下内容:
<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,而且看起来
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();
}
}