obtain a control value

2 posts, 0 answers
  1. gonzalez
    gonzalez avatar
    3 posts
    Member since:
    Sep 2010

    Posted 22 Jun 2015 Link to this post

    when I create a dynamically control within RadWizard, for example:

    // Code Behind

    Label mylabel = new Label ();             

    myetiqueta.ID = "lbl" + step.UniqueID; // step is a variable type RadWizardStep             

    etiqueta.Text = "Any Value"             

    step.Controls.Add (label); // Add control

    if I want to access control in the code behind, for example

    RadWizard.WizardSteps [0] .Controls [0];
    I do not have access to control, is there any solution?

  2. Plamen
    Plamen avatar
    2725 posts

    Posted 23 Jun 2015 Link to this post


    The added control doesn't have to be the first in the collection so we would rather recommend using FindControl.Here is the code that worked correctly at my side:
    protected void Page_Load(object sender, EventArgs e)
           Label mylabel = new Label ();            
               mylabel .ID = "lbl" ; // step is a variable type RadWizardStep            
               mylabel.Text = "Any Value";        
               RadWizardStep1.Controls.Add (mylabel); // Add control

    Hope this will help you solve the issue.

  3. Telerik UI for ASP.NET Core is out
Back to Top