This is a migrated thread and some comments may be shown as answers.

Set image to the radbutton

2 Answers 368 Views
Button
This is a migrated thread and some comments may be shown as answers.
hedi
Top achievements
Rank 1
hedi asked on 11 Oct 2011, 04:59 PM
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 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 12 Oct 2011, 06:02 AM
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.
0
hedi
Top achievements
Rank 1
answered on 12 Oct 2011, 09:14 AM
thanks that's what i was searching for ;)
Tags
Button
Asked by
hedi
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
hedi
Top achievements
Rank 1
Share this question
or