hi i have a userControl with this property :
public string UserImg { get; set; }
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
userImg.Src = UserImg;
}
}
and markup :
<img class="userImg" src="" width="90" id="userImg" runat="server" />
when i use this userControl and set it in code :
StudentDetail1.UserImg = string.Format("AdminPanel/StudentsPic/{0}",query.Pictuer);
(query is my linq to entite’s query that contain image name like ‘person.png’).
image is’not displayed,because i have got an extra “UserControl” below:
<img src="UserControl/AdminPanel/StudentsPic/man.png" id="right_StudentDetail1_userImg" class="userImg" width="90">
how can i remove “UserControl” from src.
try using