Change properties of Web page controls in ASPX.CS
2005-10-24 11:41
435 查看
In ASPX.CS
System.Web.UI.HtmlControls.HtmlImage IMG = (System.Web.UI.HtmlControls.HtmlImage)Page.FindControl("IMG1");
IMG.Attributes.Add("src", "image/TopPic1.gif");
In ASPX
<img src="image/TopPic.gif" border="0" runat="server" width="630" height="79" usemap="#Navigation"
id="IMG1" name="IMG1">
System.Web.UI.HtmlControls.HtmlImage IMG = (System.Web.UI.HtmlControls.HtmlImage)Page.FindControl("IMG1");
IMG.Attributes.Add("src", "image/TopPic1.gif");
In ASPX
<img src="image/TopPic.gif" border="0" runat="server" width="630" height="79" usemap="#Navigation"
id="IMG1" name="IMG1">
相关文章推荐
- web控件在.aspx页面中在.aspx.cs后台代码Page_Load()中都设置了相同的属性,哪个优先级高?
- How to change context root of a dynamic web project in Eclipse
- How to get the HTML source of a webpage in Ruby
- maven Cannot change version of project facet Dynamic Web Module to 3.0 Error in Eclipse
- How to fix Cannot change version of project facet Dynamic Web Module to 3.0 Error in Eclipse---转载
- Java - How to change context root of a dynamic web project in eclipse
- improving performance of your web page by use gzip in you web server.
- A Day in the Life of a Web Page Request
- 16 Inspiring Examples of Interactive Maps in Web Design
- Cannot change version of project facet Dynamic Web Module to 2.4原因&解决办法
- 解决Cannot change version of project facet Dynamic web module to 2.5
- 解决Cannot change version of project facet Dynamic web module to 3.0
- Cannot change version of project facet Dynamic web module to 2.5
- Making the Newsfeed web part available outside of My Sites in SharePoint 2013
- Change shortcut key of forward navigation in VS2012 text editor
- Create screenshots of a web page using Python and QtWebKit | Roland's Blog
- Web page layout in mozilla翻译
- 解决Cannot change version of project facet Dynamic Web M
- 解决Cannot change version of project facet Dynamic web module to 2.5
- Eclipse解决cannot change version of project facet dynamic web问题