RadBinaryImage with URL

2 posts, 0 answers
  1. Sucheta Patil
    Sucheta Patil avatar
    52 posts
    Member since:
    Jan 2010

    Posted 10 Feb 2010 Link to this post

    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

     

     

     

     

     

  2. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 11 Feb 2010 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top