我根据书上的内容按如下步骤操作:
1、用.net2003新建一个project:vb.net,templates:asp.net web application.
2、进入界面,这是html代码:
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="WebApplication8.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name=vs_defaultClientScript content="JavaScript">
<meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5">
</head>
<body MS_POSITIONING="GridLayout"> <form id="Form1" method="post" runat="server"> </form> </body>
</html>
3、我想让该程序显示“hello world”
所以加了条语句:<% Response.Write ("hello world")%>
4、程序编译运行,出现的页面一片空白,请问是什么原因,没有显示"hello world"
1、用.net2003新建一个project:vb.net,templates:asp.net web application.
2、进入界面,这是html代码:
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="WebApplication8.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name=vs_defaultClientScript content="JavaScript">
<meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5">
</head>
<body MS_POSITIONING="GridLayout"> <form id="Form1" method="post" runat="server"> </form> </body>
</html>
3、我想让该程序显示“hello world”
所以加了条语句:<% Response.Write ("hello world")%>
4、程序编译运行,出现的页面一片空白,请问是什么原因,没有显示"hello world"
Response.Write ("hello world");
完了执行,就可以了
a.aspx
<%@ Page Language="vb"%>
<% Response.Write ("hello world")%>
<% Response.Write("hello world");%>