Set image to the radbutton

3 posts, 0 answers
  1. hedi
    hedi avatar
    18 posts
    Member since:
    Jan 2008

    Posted 11 Oct 2011 Link to this post

    hi,

    i want to replace an imagebutton control by the radbutton but i'am having a problem with setting image by the code behind.

    thanks!
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 12 Oct 2011 Link to this post

    Hello Hedi,

    You can try the following code snippet to set image to the RadButton.

    ASPX:
    <div>
    <telerik:RadButton ID="RadButton1" runat="server" Text="click">
     </telerik:RadButton>
    </div>

    C#:
    protected void Page_Load(object sender, EventArgs e)
     {
       RadButton1.Image.IsBackgroundImage = true;
       RadButton1.Image.ImageUrl = "Images/img.gif";  
     }

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. hedi
    hedi avatar
    18 posts
    Member since:
    Jan 2008

    Posted 12 Oct 2011 Link to this post

    thanks that's what i was searching for ;)
Back to Top