首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

局部刷新解决方案

2012-02-10 
局部刷新trth height33 scoperow /thtd alignright classbiaozhunziti会员密码:/td

局部刷新
<tr>
  <th height="33" scope="row">&nbsp;</th>
  <td align="right" class="biaozhunziti">
  会员密码:</td>
  <td colspan="4">
  <asp:TextBox ID="txtPass" runat="server" Width="135px" TextMode="Password"></asp:TextBox></td>
  <td>&nbsp;</td>
  </tr>
  <tr>
  <th height="32" scope="row">&nbsp;</th>
  <td align="right" class="biaozhunziti">确认密码:</td>
  <td colspan="4">
  <asp:TextBox ID="txtValidatePass" runat="server" Width="135px" TextMode="Password"></asp:TextBox><asp:CompareValidator
  ID="CompareValidator1" runat="server" ControlToCompare="txtPass" ControlToValidate="txtValidatePass"
  Display="Dynamic" ErrorMessage="两次密码不一致">*</asp:CompareValidator></td>
  <td>&nbsp;</td>
  </tr>
  <asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate> <tr>
  <th height="32" scope="row">&nbsp;</th>
   
  <td align="right" class="biaozhunziti">用户类型:</td>
  <td colspan="8">
  <asp:RadioButtonList ID="rbusertype" runat="server" 
  RepeatDirection="Horizontal" AutoPostBack="True" 
  onselectedindexchanged="rbusertype_SelectedIndexChanged">
  <asp:ListItem>省级</asp:ListItem>
  <asp:ListItem>市级</asp:ListItem>
  <asp:ListItem>区/县级</asp:ListItem>
  <asp:ListItem>镇级</asp:ListItem>
  <asp:ListItem>超级管理员</asp:ListItem>
  </asp:RadioButtonList>
  </td>
   
  </tr>
  <tr>
  <th height="31" scope="row">&nbsp;</th>
  <td align="right" class="biaozhunziti">用户所在:</td>
  <td colspan="8">
  <asp:DropDownList ID="DropDownList6" runat="server" 
  DataSourceID="SqlDataSource3" DataTextField="sText" 
  DataValueField="sText" AutoPostBack="True" 
  onselectedindexchanged="DropDownList6_SelectedIndexChanged" 
  Height="21px" style="margin-right: 0px">
   
  </asp:DropDownList>
  <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
  ConnectionString="<%$ ConnectionStrings:db_userManageConnectionString14 %>" 
  SelectCommand="SELECT [sText] FROM [province]"></asp:SqlDataSource>


  <asp:DropDownList ID="DropDownList4" runat="server" 
  AutoPostBack="True" 
  onselectedindexchanged="DropDownList4_SelectedIndexChanged" 
  Height="21px">
   
  </asp:DropDownList>
   
  <asp:DropDownList ID="DropDownList5" runat="server" 
  AutoPostBack="True" 
  onselectedindexchanged="DropDownList5_SelectedIndexChanged" 
  Height="21px">
   
  </asp:DropDownList>
  <asp:DropDownList ID="DropDownList7" runat="server">
  </asp:DropDownList>
  </td>
   
  </tr>
  </ContentTemplate>
</asp:UpdatePanel>

[解决办法]
虽然iframe已经很老了……
[解决办法]
1)给UpdatePanel 加UpdateMode ="Conditional"

2)在</ContentTemplate>后加
<Triggers>
<asp:AsyncPostBackTrigger ControlID="rbusertype" EventName ="SelectedIndexChanged" />
</Triggers>
[解决办法]
Conditional 可以否
[解决办法]
不用iframe用什么好?

探讨
<tr>
<th height="33" scope="row">&amp;nbsp;</th>
<td align="right" class="biaozhunziti">
会员密码:</td>
<td colspan="4">
<a……

热点排行