<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="WebApplication9.WebForm1" codePage="936"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<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>
<%
dim ghy as string
ghy=request("ghyghost")
response.write(ghy)
'http://localhost/WebApplication9/WebForm1.aspx?ghyghost=高红岩
%>
  </body>
</html>乱码解决方案。
------------------------------------------------------------------------
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="WebApplication11.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
  <head>
    <title>WebForm1</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <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>
    <script language=vb runat=server>
  
    Sub Page_Load()
Response.Write("网页在加载时发生Load 事件, 即自动执行本程序<br>")
End Sub
    </script>
  <body MS_POSITIONING="GridLayout">    <form id="Form1" method="post" runat="server">    </form>
  </body>
</html>不显示信息啊,怎么办?
但这样写就好使:
<html>
<%
Response.Write("事件发生后")
%>
<Script Language="VB" Runat="Server">
Sub Page_Load()
Response.Write("网页在加载时发生Load 事件, 即自动执行本程序<br>")
End Sub
</Script>
</html>怎么回事啊???
------------------------------------------------------------------
--------------------------------------------------------------

解决方案 »

  1.   

    <%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="WebApplication11.WebForm1"%>
    你的事件都指定在 webForm1.aspx.vb 里, ASPX 文件里无效了
      

  2.   

    乱码只要改 编码方式就可以了可以改 web.config
    可以在 page 里改
    可以直接在 HTML 里,加上 <META ...
      

  3.   

    Codebehind="WebForm1.aspx.vb" 呵呵,你用的代码界面分离,用的是webform1.aspx.vb文件里面的
    page_onload事件,你没有写代码,当然没有反映
    乱玛问题,在webconfig文件中,把编码方式都设置为gb2312,就没有问题了