如何在不刷新页面的情况下更改所选索引 [英] How to make the selected index change without refreshing the page
本文介绍了如何在不刷新页面的情况下更改所选索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的应用程序中,我使用的是下拉列表,我已返回所选的索引更改事件,以使某些控件显示为true和false.我已使用更新面板来不刷新整个页面.但是,当我选择下拉菜单时,页面每次都会刷新.在我的应用程序中,我使用了7个updatepanels.
谁能解决我的问题.这是代码:
Hi,
In my application I am using the dropdownlist for that I have return the selected index change event for making some controls to visible true and false. I have used the update panel for not refreshing the whole page. But when I select the dropdown the page is refreshing for every time. In my application I have used 7 updatepanels.
Can anyone solve my problem. Here is the code:
<tr>
<td>
<asp:UpdatePanel id="UpdatePanel1" runat="server" UpdateMode="Conditional">
<contenttemplate>
<table align="center">
<tr>
<td align="left" >
<asp:Label id="lblPriorityId" runat="server" CssClass="css_normalLabel"
Text="Priority:" ></asp:Label></td>
<td align="left" >
<asp:DropDownList ID="ddlPriorityId" runat="server" CssClass="css_dropdown"
TabIndex="27" Width="100px">
<asp:ListItem value="S">Standard</asp:ListItem>
<asp:ListItem value="H">High</asp:ListItem>
</asp:DropDownList></td>
<td align="right">
<asp:Label id="lblDecideToBidId" runat="server" CssClass="css_normalLabel"
Text="Bid Manager Decision:" ></asp:Label></td>
<td align="left"
>
<asp:DropDownList ID="ddlDecideToBidId" runat="server" CssClass="css_dropdown"
TabIndex="28" AutoPostBack="true" OnSelectedIndexChanged="ddlDecideToBidId_SelectedIndexChanged"
Width="100px">
<asp:ListItem value="Y">Go</asp:ListItem>
<asp:ListItem value="N">No Go</asp:ListItem>
</asp:DropDownList>
</td></tr>
<tr><td align="left">
<asp:Label ID="lblBidOwner" CssClass="css_normalLabel" runat="server"
Text="Bid Owner:"></asp:Label>
</td><td align="left" >
<asp:RadioButtonList ID="rdbBidowner" runat="server" CssClass="css_radiobutton_list"
OnSelectedIndexChanged="rdbBidOwner_SelectedIndexChanged"
RepeatDirection="Horizontal" AutoPostBack="True" Width="150px" TabIndex="29" >
<asp:ListItem Value="S">Self</asp:ListItem>
<asp:ListItem Value="B">Bid Engineer</asp:ListItem>
</asp:RadioButtonList>
</td>
<td align="left">
<asp:DropDownList ID="drpBidEngineer" runat="server"
CssClass="css_dropdown" Visible="false" TabIndex="30" Width="100px">
</asp:DropDownList>
</td>
</tr>
</table>
</contenttemplate>
</asp:UpdatePanel>
</td>
</tr>
在Advance中感谢
Thanks in Advance
推荐答案
您必须b使用updatepanel的下拉菜单
you must b using drop down out side of updatepanel
在DropDownList字段.这不会刷新页面.
Use RenderMode=''Partial'' in DropDownList field. This will not refresh page.
这篇关于如何在不刷新页面的情况下更改所选索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文