<%@ Page Language="C#" %>
<html>
<head>
<title>Interweaving ASP.NET code and HTML Example</title>
</head>
<body>
Line1: First HTML Line<br />
<% Response.Write ("First ASP.NET Line<br />"); %>Line2: Second HTML Line<br />
<% Response.Write ("Second ASP.NET Line<br />"); %>Line3: Third HTML Line<br />
<% Response.Write ("Third ASP.NET Line<br />"); %>
</body>
</html>
<html>
<head>
<title>Interweaving ASP.NET code and HTML Example</title>
</head>
<body>
Line1: First HTML Line<br />
<% Response.Write ("First ASP.NET Line<br />"); %>Line2: Second HTML Line<br />
<% Response.Write ("Second ASP.NET Line<br />"); %>Line3: Third HTML Line<br />
<% Response.Write ("Third ASP.NET Line<br />"); %>
</body>
</html>
此博客展示了ASP.NET代码与HTML交织的示例。代码中使用C#语言,在HTML页面里穿插了ASP.NET代码,通过Response.Write方法输出内容,与HTML内容共同构成页面展示。
1541

被折叠的 条评论
为什么被折叠?



