how do i set ToggleType?

3 posts, 1 answers
  1. moegal
    moegal avatar
    273 posts
    Member since:
    Jul 2007

    Posted 11 Oct 2012 Link to this post

    this does not work.

    RadButton myBtn = new RadButton();
         myBtn.Text = "Button";
         myBtn.ToggleType="Radio";
         PlaceHolder1.Controls.Add(myBtn);

    Any help would be appreciated

    Marty
  2. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 11 Oct 2012 Link to this post

    Hi Marty,

    Try the following code snippet to set ToggleType property of a RadButton.

    C#:
    RadButton myBtn = new RadButton();
    myBtn.Text = "Button";
    myBtn.ButtonType = RadButtonType.ToggleButton;
    myBtn.ToggleType = ButtonToggleType.Radio;
    PlaceHolder1.Controls.Add(myBtn);

    Hope this helps.

    Regards,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. moegal
    moegal avatar
    273 posts
    Member since:
    Jul 2007

    Posted 12 Oct 2012 Link to this post

    thanks! That is just what I was looking for!

    Marty
Back to Top