<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
我在asp.net 代码里写 Response.Write("Name=Test");
我希望只得到Name=Test, 不要后面的一堆东西。高手帮忙啊得到的结果是:
Name=Test<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
Untitled Page
</title></head>
<body>
<form name="form1" method="post" action="GetData.aspx?method=getallcoach" id="form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJNzgzNDMwNTMzZGRVRZPshxvu60ze3GnCDC1uxVrMdA==" />
</div> <div>
</div>
</form>
</body>
</html>
我在asp.net 代码里写 Response.Write("Name=Test");
我希望只得到Name=Test, 不要后面的一堆东西。高手帮忙啊得到的结果是:
Name=Test<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
Untitled Page
</title></head>
<body>
<form name="form1" method="post" action="GetData.aspx?method=getallcoach" id="form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJNzgzNDMwNTMzZGRVRZPshxvu60ze3GnCDC1uxVrMdA==" />
</div> <div>
</div>
</form>
</body>
</html>
直接override Render, 注释base.Render()就可以了
大家回帖就给分,
真晕,我的100分啊。
可惜我的100分啊,成水贴了,回帖给分
可惜我的100分啊,成水贴了,回帖给分
Response.Write(s);
Response.End();
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="WebApplication2.WebForm2" %><%--<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>--%>using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;namespace WebApplication2
{
public partial class WebForm2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Response.Write("This is The Text!");
}
}
}
其他的全部注释掉。