<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<script runat=”server”>
protected void Page_Load( object sender, EventArgs e )
{
HyperLink3.Text = “<img border=’0′ src=’http://www.dwww.cn/Images/Indexlogo.gif’ height=’182′ />”;
Literal Literal1 = new Literal();
Literal1.Text = “<img border=’0′ src=’http://www.dwww.cn/Images/Indexlogo.gif’ height=’182′ />”;
HyperLink4.Controls.Add(Literal1);
\n
Image image = new Image();
image.Height = Unit.Pixel(100);
image.ImageUrl = “http://www.dwww.cn/Images/Indexlogo.gif”;
HyperLink5.Controls.Add(image);
}
</script>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head runat=”server”>
<title>HyperLink 控制图片宽度高度的几种方法</title>
</head>
<body>
<form id=”form1″ runat=”server”>
<asp:HyperLink ID=”HyperLink1″ runat=”server” NavigateUrl=”http://www.dwww.cn”>
<img border=’0′ src=’http://www.dwww.cn/Images/Indexlogo.gif’ height=’182′ /></asp:HyperLink>
<br />
<asp:HyperLink ID=”HyperLink2″ runat=”server” NavigateUrl=”http://www.dwww.cn”
Text=”<img border=’0′ src=’http://www.dwww.cn/Images/Indexlogo.gif’ height=’182′ />”></asp:HyperLink>
<br />
<asp:HyperLink ID=”HyperLink3″ runat=”server” NavigateUrl=”http://www.dwww.cn”></asp:HyperLink>
<br />
<asp:HyperLink ID=”HyperLink4″ runat=”server” NavigateUrl=”http://www.dwww.cn”></asp:HyperLink>
<br />
<asp:HyperLink ID=”HyperLink5″ runat=”server” NavigateUrl=”http://www.dwww.cn”></asp:HyperLink>
<br />
<asp:HyperLink ID=”HyperLink6″ runat=”server” NavigateUrl=”http://www.dwww.cn”>
<asp:Image ImageUrl = “http://www.dwww.cn/Images/Indexlogo.gif” runat=”server” Height=”100″ />
</asp:HyperLink>
</div>
</form>
</body>
</html>