Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 05, 2013 03:02 PM by anujrathi
Member
7 Points
4 Posts
Jan 05, 2013 01:22 PM|LINK
How to display id with extension of particular image while using database
All-Star
27543 Points
4109 Posts
Jan 05, 2013 01:52 PM|LINK
Is id is a server variable? if so, make the id a page level public variable and you can use this in the HTML markup.
e.g.
<img src="<%=id%>.jpg" .../>
193 Points
113 Posts
Jan 05, 2013 03:02 PM|LINK
If you are biding the data from database the use below to set the image source:
<img src='<%# Eval("ImageID") + ".jpg">'
or
<img src='<%# Eval("ImageID") >.jpg'
If you are saving image extension in database then:
<img src='<%# Eval("ImageID").ToString() + Eval("Extension") >'
dhavalmpatel
Member
7 Points
4 Posts
product upload
Jan 05, 2013 01:22 PM|LINK
How to display id with extension of particular image while using database
sreejukg
All-Star
27543 Points
4109 Posts
Re: product upload
Jan 05, 2013 01:52 PM|LINK
Is id is a server variable? if so, make the id a page level public variable and you can use this in the HTML markup.
e.g.
<img src="<%=id%>.jpg" .../>
My Blog
anujrathi
Member
193 Points
113 Posts
Re: product upload
Jan 05, 2013 03:02 PM|LINK
If you are biding the data from database the use below to set the image source:
<img src='<%# Eval("ImageID") + ".jpg">'
or
<img src='<%# Eval("ImageID") >.jpg'
or
If you are saving image extension in database then:
<img src='<%# Eval("ImageID").ToString() + Eval("Extension") >'