Using vb code in aspx for image source

Hi Guys and Gals, can anyone get the following line of code to work ?

<img alt="Item Photo" src='~/UploadLogos/
<script>User.Identity.Name</script>
.jpg' style="border:0;" />
LVL 1
Netlink2Asked:
Who is Participating?
 
steveberzinsCommented:
how about:
<img alt="Item Photo" src='<%=ResolveUrl("~/UploadLogos/" & User.Identity.Name & ".jpg")%>' style="border:0;" />
?
0
 
Netlink2Author Commented:
Sorry Steve, that didn't work
0
 
steveberzinsCommented:
ok, what did it do?

you're using this in a aspx page, right?

did you look at the properties/source, and did it do anything?

in my test page, it worked...at least how I expected it to.

src='http://localhost:2521/UploadLogos/DRAGON/Steve.jpg'

my user id is DRAGON\Steve, and it put that in just like I'd think it should...

do you just need the user part of the domain\userid? or???

more info about what it did/didn't do, and what you want it to do maybe would help
0
 
Netlink2Author Commented:
my bad, I hadn't logged in (Oops :)  ). Thanks for testing it, etc.
0
 
steveberzinsCommented:
no problem, just glad it wasn't me this time ;)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.