Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
3550
How to get current value
posted
In continue to  the post 
http://es.infragistics.com/community/forums/t/76628.aspx

I need to get the current value of the WebDropDown.

I wrote the following code.

I get null in  the object combo

it seems to be that the problem is that I use master page this time

 



<%@ Page Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind=" ParametersFrm.aspx.cs "

    Inherits="OptionPricer.ParametersFrm" %> 

<%@ Register Assembly="Infragistics4.Web.v11.2, Version=11.2.20112.1019, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" 

    Namespace="Infragistics.Web.UI.EditorControls" TagPrefix="ig" %> 

<%@ Register Assembly="Infragistics4.Web.v11.2, Version=11.2.20112.1019, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"  

    Namespace="Infragistics.Web.UI" TagPrefix="ig1" %> 

<%@ Register Assembly="Infragistics4.Web.v11.2, Version=11.2.20112.1019, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" 

    Namespace="Infragistics.Web.UI.ListControls" TagPrefix="ig" %> 

<%@ Register Assembly="PortalControls" Namespace="PortalControls" TagPrefix="cc1" %> 

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"> 

    <title></title> 

    <script language="javascript" type="text/javascript"> 

        function Button1_onclick() { 

            var combo = $find("comboCurrencies"); 

            var txt = combo.get_currentValue(); 

        } 

    </script> 

</asp:Content> 

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> 

    <ig1:WebScriptManager ID="WebScriptManager1" runat="server"> 

    </ig1:WebScriptManager> 

    <div class="input-container"> 

      

        <ig:WebDropDown ID="comboCurrencies" runat="server" Width="200px"> 

            <Items> 

                <ig:DropDownItem Key="x" Selected="False" Text="x" Value="x"> 

                </ig:DropDownItem> 

                <ig:DropDownItem Key="y" Selected="False" Text="y" Value="y"> 

                </ig:DropDownItem> 

            </Items> 

        </ig:WebDropDown> 

        <input id="Button1" type="button" value="button" onclick="return Button1_onclick()" /> 

        

    </div> 

</asp:Content>