菜鸟提问:关于网页控件响应出错的问题,谢谢
「已注销」 2013-07-25 11:08:29 我在网上找了段代码,文件上传(之前可以用的)的,如下:
<tr class="left_title_1">
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<tr bgcolor="#ffffff">
<td height="24" width="30%">文件发布: </td>
<td height="24">
<input type="file" id="Up_file" class="edline" runat="server" style="WIDTH: 456px; HEIGHT: 24px" size="60" name="Up_file"/>
</td>
</tr>
<tr bgcolor="#ffffff">
<td height="24" align="center">
<asp:Button ID="submit" Runat="server" Text="文件上传" onclick="submit_Click" CssClass="Cmdbut" Height="24px"></asp:Button>
</td>
</tr>
</ContentTemplate>
</asp:UpdatePanel>
</tr>
后来加了一些控件,如下:
<tr class="left_title_3">
<td>选择部门:</td>
<asp:UpdatePanel ID="UpdatePanel4" runat="server">
<ContentTemplate>
<asp:DropDownList ID="DDLstPart" class="DDLstPartCssClass" TextMode="SingleLine"
runat="server" ReadOnly="True" Height="16px" Width="156px"
onselectedindexchanged="DDLstPart_SelectedIndexChanged" AutoPostBack="True">
</asp:DropDownList>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ParentList" EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
<td>接收列表:</td>
</tr>
在选择DropDownList ID="DDLstPart" 时,控件input type="file" id="Up_file"中的内容就会被清空,这是咋回事啊?
谢谢大家了