How to find control

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?aUhhdkFRdWVzdGlvbg==?=

    How to find control

    I am using a menu control in which i have a tab controld in which i have a
    dropdownlilst

    How do i find the values in a control.

    I have tried this in C#
    ?LTCMenu1.FindC ontrol[Tab2.FindContro l[ddlStatusVerify .DataValueField .ToString()]]


    Can any one plz help me out.



  • Joe

    #2
    Re: How to find control

    Control.FindCon trol returns a Control Object.

    you have to cast that control as the type you expect. In this case a
    DropdownList. Then you can access the DataValueField Member.

    Control c = new Control();
    DropDownList ddl = (DropDownList)c .FindControl("i d");
    if (ddl != null)
    {
    string value = ddl.DataValueFi eld;
    }


    On Apr 29, 9:35 am, iHavAQuestion
    <iHavAQuest...@ discussions.mic rosoft.comwrote :
    I am using a menu control in which i have a tab controld in which i have a
    dropdownlilst
    >
    How do i find the values in a control.
    >
    I have tried this in C#
    ?LTCMenu1.FindC ontrol[Tab2.FindContro l[ddlStatusVerify .DataValueField .ToStr­ing()]]
    >
    Can any one plz help me out.

    Comment

    Working...