In this article i have explain how to add image source from c# code behind
Step 1-
insert the html image tag into your aspx page
<img id="ImageId" runat="server" width="100" height="100" />
here i have add image tag into aspx page. the tag ID is ImagesId
Step 2-
Now add the image source to image tag from c# code
string imageUrl = "images/bg.jpg";
ImageId.Attributes.Add("src", imageUrl);
Step 1-
insert the html image tag into your aspx page
<img id="ImageId" runat="server" width="100" height="100" />
here i have add image tag into aspx page. the tag ID is ImagesId
Step 2-
Now add the image source to image tag from c# code
string imageUrl = "images/bg.jpg";
ImageId.Attributes.Add("src", imageUrl);
No comments:
Post a Comment