下拉列表刷新自身 [英] dropdown list refreshes its self

查看:56
本文介绍了下拉列表刷新自身的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面的家伙是我的空地

Hi Guys below is my dropdow

<asp:DropDownList ID="ddlGetCurr" runat="server" Height="20px" Width="170px" AutoPostBack="true" onselectedindexchanged="ddlGetCurr_SelectedIndexChanged"></asp:DropDownList>


每当我选择一个项目时,下拉菜单都会刷新其自身,但不会采用所选的值.

我尝试了以下方法,但没有任何效果.

1.ddlSubject.SelectedValue.ToString()
2.ddlSubject.SelectedItem.Text
3. ddlSubject.SelectedIndex.ToString()
4.ddlSubject.Text

我实际上需要"AutoPostback =" true".请帮助


Every Time i select an item my dropdown refreshes its self, it doesnt take the selected value.

I have tried the following but nothing workd.

1.ddlSubject.SelectedValue.ToString()
2.ddlSubject.SelectedItem.Text
3. ddlSubject.SelectedIndex.ToString()
4.ddlSubject.Text

the "AutoPostback=''true''" I actualy need it. Please help

推荐答案

嗨 在代码中添加更新面板..

Hi Add update panel in your code..

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
           <ContentTemplate>
               <fieldset>
               <legend>UpdatePanel</legend>
               //Add your dropdown here;
               </fieldset>
           </ContentTemplate>
       </asp:UpdatePanel>


这篇关于下拉列表刷新自身的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆