<form id="form1" runat="server">
<div style="height: 650px">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<table border="1" width="600" bgcolor="#3366FF">
<tr>
<td>
<asp:DropDownList ID="dateselect" runat="server"
onselectedindexchanged="dataSelectedIndexChanged" AutoPostBack="true">
<asp:ListItem Text="日查询" selected="True" Value="0"/>
<asp:ListItem Text="月查询" Selected="false" Value="1"/>
<asp:ListItem Text="年查询" Selected="false" Value="2"/>
</asp:DropDownList>
</td>
<td>
<asp:DropDownList ID="typeselect" runat="server"
onselectedindexchanged="typeSelectedIndexChanged" AutoPostBack="true">
<asp:Listitem Text="曲线图" Value="0" Selected="True"/>
<asp:ListItem Text="柱状图" Value="1" Selected="False"/>
</asp:DropDownList>
</td>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" RenderMode="Inline">
<ContentTemplate>
<td>
<asp:Label ID="selectstarttime" runat="server" Font-Bold="True"
Font-Size="X-Small" Text="请选择时间"></asp:Label>
<asp:TextBox ID="textbox1" runat="server" Enabled="False" Width="85"></asp:TextBox>
<asp:Image ID="Image1" runat="server" src="Images/calendar.gif" onclick="popUpCalendar(this,document.forms[0].textbox1,'yyyy-mm-dd')" />
</td>
</tr>
<tr align="center">
<td colspan="3">
<asp:Button ID="refer" runat="server" Text="提交" onclick="refer_Click" />
</td>
</tr>
</table>
<asp:Chart ID="Chart1" runat="server" Height="429px"
ImageLocation="~/WebCharts/f9a710e6-abc4-4169-b5df-6c9df9cb723b.Png"
ImageStorageMode="UseImageLocation"
style="margin-top: 30px; margin-left: 22px;" Width="475px"
BackImageAlignment="Center">
<BorderSkin SkinStyle="FrameThin1" BackGradientStyle="None" BorderWidth="0" PageColor="White" BackColor="#CCCCCC" BackImageAlignment="TopLeft">
</BorderSkin>
<Series>
<asp:Series Name="Low">
</asp:Series>
<asp:Series ChartArea="ChartArea1" Name="High">
</asp:Series>
<asp:Series ChartArea="ChartArea1" Name="Middle">
</asp:Series>
<asp:Series Name="Monitor">
</asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="ChartArea1">
</asp:ChartArea>
</ChartAreas>
</asp:Chart>
<br />
<asp:Button ID="Up" runat="server" Text="上一页" onclick="Up_Click" />
<asp:Button ID="Previous" runat="server" onclick="Previous_Click"
Text="上一个" />
<asp:Button ID="Next" runat="server" onclick="Next_Click" Text="下一个" />
<asp:Button ID="Down" runat="server" onclick="Down_Click" Text="下一页" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>这段页面代码,在第一次初始化时,页面时正常的,当选择条件查询后,那两个下拉列表框就跑到最下面一行去了
<div style="height: 650px">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<table border="1" width="600" bgcolor="#3366FF">
<tr>
<td>
<asp:DropDownList ID="dateselect" runat="server"
onselectedindexchanged="dataSelectedIndexChanged" AutoPostBack="true">
<asp:ListItem Text="日查询" selected="True" Value="0"/>
<asp:ListItem Text="月查询" Selected="false" Value="1"/>
<asp:ListItem Text="年查询" Selected="false" Value="2"/>
</asp:DropDownList>
</td>
<td>
<asp:DropDownList ID="typeselect" runat="server"
onselectedindexchanged="typeSelectedIndexChanged" AutoPostBack="true">
<asp:Listitem Text="曲线图" Value="0" Selected="True"/>
<asp:ListItem Text="柱状图" Value="1" Selected="False"/>
</asp:DropDownList>
</td>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" RenderMode="Inline">
<ContentTemplate>
<td>
<asp:Label ID="selectstarttime" runat="server" Font-Bold="True"
Font-Size="X-Small" Text="请选择时间"></asp:Label>
<asp:TextBox ID="textbox1" runat="server" Enabled="False" Width="85"></asp:TextBox>
<asp:Image ID="Image1" runat="server" src="Images/calendar.gif" onclick="popUpCalendar(this,document.forms[0].textbox1,'yyyy-mm-dd')" />
</td>
</tr>
<tr align="center">
<td colspan="3">
<asp:Button ID="refer" runat="server" Text="提交" onclick="refer_Click" />
</td>
</tr>
</table>
<asp:Chart ID="Chart1" runat="server" Height="429px"
ImageLocation="~/WebCharts/f9a710e6-abc4-4169-b5df-6c9df9cb723b.Png"
ImageStorageMode="UseImageLocation"
style="margin-top: 30px; margin-left: 22px;" Width="475px"
BackImageAlignment="Center">
<BorderSkin SkinStyle="FrameThin1" BackGradientStyle="None" BorderWidth="0" PageColor="White" BackColor="#CCCCCC" BackImageAlignment="TopLeft">
</BorderSkin>
<Series>
<asp:Series Name="Low">
</asp:Series>
<asp:Series ChartArea="ChartArea1" Name="High">
</asp:Series>
<asp:Series ChartArea="ChartArea1" Name="Middle">
</asp:Series>
<asp:Series Name="Monitor">
</asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="ChartArea1">
</asp:ChartArea>
</ChartAreas>
</asp:Chart>
<br />
<asp:Button ID="Up" runat="server" Text="上一页" onclick="Up_Click" />
<asp:Button ID="Previous" runat="server" onclick="Previous_Click"
Text="上一个" />
<asp:Button ID="Next" runat="server" onclick="Next_Click" Text="下一个" />
<asp:Button ID="Down" runat="server" onclick="Down_Click" Text="下一页" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>这段页面代码,在第一次初始化时,页面时正常的,当选择条件查询后,那两个下拉列表框就跑到最下面一行去了
<Triggers >
<asp:PostBackTrigger ControlID="refer" />
</Triggers>