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

RadBinaryImage with URL

1 Answer 190 Views
BinaryImage
This is a migrated thread and some comments may be shown as answers.
Sucheta Patil
Top achievements
Rank 1
Sucheta Patil asked on 10 Feb 2010, 03:58 PM
Hi

In my DB I have a field called pictures with type nvarchar(MAX) where I am keeping the URL to the image.(jpg)

I use the RadBinaryImage. I read from the sample code and it shows I have to use some Databound Control.

Which will be the basic DataBound Control (if have to be used) ?
What will be my DataValue property and how do I bind the query to RadBinaryImage.

Can you suggest? I am new to RadControls.
I was trying to do something below!!!

 

 

 

 

 

private void BindPhoto(int facultyId)   
{  
string Surname = txtSurname.Text.Trim();   
string FirstName = txtFirstName.Text.Trim();   
var query =     (from tel in dc.tdlTeldirs   
                 where (tel.Family.ToLower() == Surname.ToLower() &&    tel.First.ToLower() == FirstName.ToLower())   
                 orderby tel.First   
               select new   
               {  
                 Photo = tel.pictures  
                });  
 
             BindList(ImgPhoto, query);  *********************** I know i cant bind it like this!!!   
}  
 
 
 

But cant find out the best way!!!

Thank you

 

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 11 Feb 2010, 12:48 PM
Hi Sucheta,

If you keep merely the url to the actual physical location of the image in your database, it is enough to assign the ImageUrl property of RadBinaryImage to visualize it. Another option would be to use regular asp Image or built-in GridImageColumn (in case you display the data in a table format).

Best regards,
Sebastian
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
BinaryImage
Asked by
Sucheta Patil
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Share this question
or