<style type="text/css">
.ttl
{
cursor: hand;
color: #ffffff;
padding-top: 4px;
}
A:active
{
color: #000000;
text-decoration: none;
}
A:hover
{
color: #000000;
text-decoration: none;
}
A:link
{
color: #000000;
text-decoration: none;
}
A:visited
{
color: #000000;
text-decoration: none;
}
TD
{
font-size: 12px;
font-family: "Verdana" , "Arial" , "细明体" , "sans-serif";
}
</style><script language="javascript" type="text/javascript">
function showHide(obj){
var oStyle = obj.parentElement.parentElement.parentElement.rows[1].style;
oStyle.display == "none" ? oStyle.display = "block" : oStyle.display = "none";
}
</script><div style=" border: 1px solid #3366CC; width:160px; text-align: center; background-color: #9aadcd;">
<div>
监测点列表</div>
<asp:Repeater ID="rpMenu" runat="server" OnItemDataBound="rpsubMenu_ItemDataBound">
<ItemTemplate>
<table cellspacing="0" cellpadding="0" width="159" align="center" border="0">
<tr>
<td width="23">
<img height="25" src="<%=ApplicationPath%>/images/box/box_topleft.gif" width="23">
</td>
<td class="ttl" onclick="JavaScript:showHide(this);" width="129" background="<%=ApplicationPath%>/images/box/box_topbg.gif">
<%# Eval("OutputName")%>
</td>
<td width="7">
<img height="25" src="<%=ApplicationPath%>/images/box/box_topright.gif" width="7">
</td>
</tr>
<!--<tr style="display: none"> -->
<tr>
<td background='<%=ApplicationPath%>/images/box/box_bg.gif' colspan='3'>
<table width='100%'>
<tbody>
<asp:Repeater ID="rpMenu_Sub" runat="server">
<ItemTemplate>
<tr>
<td>
<img height='7' hspace='5' src='<%=ApplicationPath%>/images/box/arrow.gif' width='5' align='absMiddle'>
<asp:LinkButton ID="lnkbtn" runat="server" CommandName="pollutantcode" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "Outputcode")+"_"+DataBinder.Eval(Container.DataItem, "pollutantcode")%>'
OnCommand="lnkbtn_Command" ><%# Eval("pollutantName")%></asp:LinkButton>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</tbody>
</table>
</td>
</tr>
<tr>
<td colspan="3">
<img height='10' src="<%=ApplicationPath%>/images/box/box_bottom.gif" width='159'>
</td>
</tr>
</table>
</ItemTemplate>
</asp:Repeater>
<div style="font-size: 12px; width: 163px;">
<asp:RadioButton ID="rdbtnWater" runat="server" Text="废水" AutoPostBack="True" Checked="True"
GroupName="rdlist" OnCheckedChanged="rdbtnWater_CheckedChanged" />
<asp:RadioButton ID="rdbtnGos" runat="server" Text="废气" AutoPostBack="True" GroupName="rdlist"
OnCheckedChanged="rdbtnWater_CheckedChanged" />
</div>
</div>
前台后台: protected void lnkbtn_Command(object sender, CommandEventArgs e)
{
if (e.CommandName == "pollutantcode" && e.CommandArgument.ToString() != "")
{
string strText = e.CommandArgument.ToString(); string Sp = "_"; char[] Char = Sp.ToCharArray(); string[] strArray = strText.Split(Char); OutputCode = strArray[0].ToString().Trim();
pollutantcode = strArray[1].ToString().Trim(); this.onclick(e);
}
}
.ttl
{
cursor: hand;
color: #ffffff;
padding-top: 4px;
}
A:active
{
color: #000000;
text-decoration: none;
}
A:hover
{
color: #000000;
text-decoration: none;
}
A:link
{
color: #000000;
text-decoration: none;
}
A:visited
{
color: #000000;
text-decoration: none;
}
TD
{
font-size: 12px;
font-family: "Verdana" , "Arial" , "细明体" , "sans-serif";
}
</style><script language="javascript" type="text/javascript">
function showHide(obj){
var oStyle = obj.parentElement.parentElement.parentElement.rows[1].style;
oStyle.display == "none" ? oStyle.display = "block" : oStyle.display = "none";
}
</script><div style=" border: 1px solid #3366CC; width:160px; text-align: center; background-color: #9aadcd;">
<div>
监测点列表</div>
<asp:Repeater ID="rpMenu" runat="server" OnItemDataBound="rpsubMenu_ItemDataBound">
<ItemTemplate>
<table cellspacing="0" cellpadding="0" width="159" align="center" border="0">
<tr>
<td width="23">
<img height="25" src="<%=ApplicationPath%>/images/box/box_topleft.gif" width="23">
</td>
<td class="ttl" onclick="JavaScript:showHide(this);" width="129" background="<%=ApplicationPath%>/images/box/box_topbg.gif">
<%# Eval("OutputName")%>
</td>
<td width="7">
<img height="25" src="<%=ApplicationPath%>/images/box/box_topright.gif" width="7">
</td>
</tr>
<!--<tr style="display: none"> -->
<tr>
<td background='<%=ApplicationPath%>/images/box/box_bg.gif' colspan='3'>
<table width='100%'>
<tbody>
<asp:Repeater ID="rpMenu_Sub" runat="server">
<ItemTemplate>
<tr>
<td>
<img height='7' hspace='5' src='<%=ApplicationPath%>/images/box/arrow.gif' width='5' align='absMiddle'>
<asp:LinkButton ID="lnkbtn" runat="server" CommandName="pollutantcode" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "Outputcode")+"_"+DataBinder.Eval(Container.DataItem, "pollutantcode")%>'
OnCommand="lnkbtn_Command" ><%# Eval("pollutantName")%></asp:LinkButton>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</tbody>
</table>
</td>
</tr>
<tr>
<td colspan="3">
<img height='10' src="<%=ApplicationPath%>/images/box/box_bottom.gif" width='159'>
</td>
</tr>
</table>
</ItemTemplate>
</asp:Repeater>
<div style="font-size: 12px; width: 163px;">
<asp:RadioButton ID="rdbtnWater" runat="server" Text="废水" AutoPostBack="True" Checked="True"
GroupName="rdlist" OnCheckedChanged="rdbtnWater_CheckedChanged" />
<asp:RadioButton ID="rdbtnGos" runat="server" Text="废气" AutoPostBack="True" GroupName="rdlist"
OnCheckedChanged="rdbtnWater_CheckedChanged" />
</div>
</div>
前台后台: protected void lnkbtn_Command(object sender, CommandEventArgs e)
{
if (e.CommandName == "pollutantcode" && e.CommandArgument.ToString() != "")
{
string strText = e.CommandArgument.ToString(); string Sp = "_"; char[] Char = Sp.ToCharArray(); string[] strArray = strText.Split(Char); OutputCode = strArray[0].ToString().Trim();
pollutantcode = strArray[1].ToString().Trim(); this.onclick(e);
}
}
OnCommand="lnkbtn_Command" > <%# Eval("pollutantName")%> </asp:LinkButton>
我发现只要给后台提交就会收缩,不提交一切正常,可是我的程序要求必须提交,请高人帮助,郁闷死了~