例如:test.aspx
它的前台页面源代码是
1
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="test" %>
2
3
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
5
<html xmlns="http://www.w3.org/1999/xhtml" >
6
<head runat="server">
7
<title>无标题页</title>
8
</head>
9
<body>
10
<form id="form1" runat="server">
11
<div>
12
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" /><br />
13
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="login.aspx?ComeUrl=http://test.com.cn">HyperLink</asp:HyperLink> </div>
14
</form>
15
</body>
16
</html>
17
后台代码是2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
1
using System;
2
using System.Data;
3
using System.Configuration;
4
using System.Collections;
5
using System.Web;
6
using System.Web.Security;
7
using System.Web.UI;
8
using System.Web.UI.WebControls;
9
using System.Web.UI.WebControls.WebParts;
10
using System.Web.UI.HtmlControls;
11
using System.Drawing;
12
using System.Drawing.Drawing2D;
13
using System.Drawing.Imaging;
14
15
public partial class test : System.Web.UI.Page
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
我在它的page_load方法中写了如下字符
1
private void Page_Load(object sender, EventArgs e)
2
}
2
当我用浏览器访问这个页面时,页面显示234,源代码如下
1
2
3
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
5
<html xmlns="http://www.w3.org/1999/xhtml" >
6
<head><title>
7
无标题页
8
</title></head>
9
<body>
10
<form name="form1" method="post" action="test.aspx" >
2
3
4
5
6
7
8
9
10
,但当我用prototype的 new Ajax.Request("test.aspx",{相关参数})来读取时,发现它读出的源代码竟然没有234,如下
读出来的源代码是
他读出的html源代码不是动态的html源代码,好像后面的page_load方法就没有运行一样?这怎么回事?