我有2个List和一个Datagridview。第一个列表用于级别和类别 例如。 Lvl1 - Cat1,Lvl2 - Cat2
第二个清单。
<ul>
<li>
<asp:LinkButton ID="tabsss" OnClick="tabsss_Click" runat="server">SSS
</asp:LinkButton></li>
<li>
<asp:LinkButton ID="tabphl" OnClick="tabphl_Click2" runat="server">Phil Health
</asp:LinkButton></li>
<li>
<asp:LinkButton ID="tabhdmf" OnClick="tabhdmf_Click1" runat="server">HMDF
</asp:LinkButton></li>
<li>
<asp:LinkButton ID="tabtax" OnClick="tabtax_Click1" runat="server">TAX
</asp:LinkButton></li>
</ul>
当我选择第一对Level和类别时,SqlDataSource工作正常。当我点击第二对时,onclick(tabsss_Click&amp; others)没有执行。
SQL DataSource
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:MISConnectionString %>"
SelectCommandType ="StoredProcedure"
SelectCommand="sp_SSSTable"
UpdateCommand="UPDATE tbl_HRMS_SSSTable SET r_frm = @r_frm, r_to = @r_to, monthly = @monthly, ee_contrib = @ee_contrib, er_contrib = @er_contrib, ec_er_contrib = @ec_er_contrib WHERE (ID = @ID)">
<SelectParameters>
<asp:Parameter Name="EMPLVL" Type="String" />
<asp:Parameter Name="EMPCAT" Type="String" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="r_frm" />
<asp:Parameter Name="r_to" />
<asp:Parameter Name="monthly" />
<asp:Parameter Name="ee_contrib" />
<asp:Parameter Name="er_contrib" />
<asp:Parameter Name="ec_er_contrib" />
<asp:SessionParameter Name="ID" SessionField="empID" />
</UpdateParameters>
</asp:SqlDataSource>
C#
protected void tabsss_Click(object sender, EventArgs e)
{
Panelsss.Visible = true;
Panelhdmf.Visible = false;
Paneltax.Visible = false;
Panelphil.Visible = false;
SqlDataSource2.SelectParameters["EMPLVL"].DefaultValue = hdnEmplvl.Value;
SqlDataSource2.SelectParameters["EMPCAT"].DefaultValue = hdnEmpcat.Value;
SqlDataSource2.DataBind();
string script66 = "alertify.success('success');";
ScriptManager.RegisterStartupScript(this, GetType(), "ServerControlScript", script66, true);
}
我该怎么办?