jeudi 2 avril 2015

How to show image in an aspx file?

I'm using this <asp:Image ID="UserPicture" runat="server" /> to show image in the aspx file and the code behind looks like this: string imagePath = "~/ProfilePictures/" + UsernameBox.Text; UserPicture.ImageUrl = imagePath;


But after loading the page, the picture won't show up, only the default picture icon appears. Any suggestions how to do it properly? (Maybe resize the image?)


Thanks


Aucun commentaire:

Enregistrer un commentaire