Asp.net, vb.net, C#.net Resources
Welcome to Asp.net, vb.net, C#.net Resources
Sign in
|
Join
|
Help
in
User Controls (forum)
FAQs (group)
(Entire Site)
Search
Home
Blogs
Forums
Downloads
Asp.net, vb.net, C#.net Resour...
»
FAQs
»
asp.net Faqs
»
User Controls
»
Re: How to change the imageurl of the image control that exists in a usercontrol?
How to change the imageurl of the image control that exists in a usercontrol?
Last post 08-22-2006, 8:36 AM by
Webdeveloper
. 1 replies.
Sort Posts:
Oldest to newest
Newest to oldest
Previous
Next
08-21-2006, 4:41 AM
303
Webdeveloper
Joined on 08-19-2006
Posts 1,589
How to change the imageurl of the image control that exists in a usercontrol?
Reply
Quote
How to change the imageurl of the image control that exists in a usercontrol?
Report abuse
08-22-2006, 8:36 AM
742
in reply to
303
Webdeveloper
Joined on 08-19-2006
Posts 1,589
Re: How to change the imageurl of the image control that exists in a usercontrol?
Reply
Quote
In the .ascx:
<asp:Image id="Image1" runat="server"></asp:Image>
In .aspx
VB.NET
<uc1:UCImage id="UCImage1" source="b2346.jpg" runat="server"></uc1:UCImage>
Dim UC As UserControl
Dim imgUC As System.Web.UI.WebControls.Image
UC = Page.FindControl("UCImage1")
imgUC = UC.FindControl("Image1")
imgUC.ImageUrl = "b2346.jpg"
C#
UserControl UC ;
System.Web.UI.WebControls.Image imgUC ;
UC = (UserControl)Page.FindControl("UCImage1");
imgUC =(System.Web.UI.WebControls.Image)UC.FindControl("Image1");
imgUC.ImageUrl = "b2346.jpg";
Report abuse
Powered by
Megasolutions ltd