Using Image in Gridview

in TemplateField…

——————

Static

<%# (Eval(“PHOTO_URL”).ToString().Length<=0) ? ” ” :
@”<img id='”+Eval(“SIRA_NO”)+@”‘ src=’..\Images\viewControl.png’ style=’margin-left:10px;’ width=’16’ height=’16’ border=’0’/>” %>

Dynamic

<img id='”+Eval(“SIRA_NO”)+@”‘ src= (Eval(“PHOTO_URL”).ToString()) style=’margin-left:10px;’ width=’16’ height=’16’ border=’0’/>”

%>

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: