hi Guys,
I save the path of where a users profile image is stored in my database
now in my code behind I create anchor controls dynamically and set the src attribute:Code:~/Profile/Images/stig1.jpg
I am currently in the directory called Wall/Wall.aspx. Profile is one directory up. If i use ../Profile/Images/stig1.jpg it works. I would have though asp.net would resolve the url when I use the tilde ~. How can I make this work using the ~Code:Dim imgStatusImage As HtmlGenericControl = New HtmlGenericControl("img") imgStatusImage.ClientIDMode = UI.ClientIDMode.Static imgStatusImage.ID = String.Format("img{0}", r.Field(Of Integer)("CommentID")) imgStatusImage.Attributes.Add("src", UserProfile.ImageURL)




Reply With Quote