Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 655
  • Last Modified:

combine text to databinder.eval(container.dataitem,"fieldname" gives me an error

I need to combine the file name that is in the datasource to which the control is bound to and prefix it with the path "images/category".
 <img alt='Category2' src='<% #String.Format("/Images/category/",  DataBinder.Eval(Container.DataItem, "ImageName") %>'
                                    style="width:30px;height:30px;border:none;vertical-align:middle;float:left;" />

I tried to do it using string.format and get the error: :
BC30248: 'If', 'ElseIf', 'Else', 'End If', 'Const', or 'Region' expected.

Please suggest how I can specify the src for the image. Thanks

0
TrialUser
Asked:
TrialUser
1 Solution
 
edemcsCommented:
What about String.Concat?
0
 
TrialUserAuthor Commented:
thx
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now