如何清洁在code整个asp.net页面的背后? [英] how to clean the whole asp.net page in code behind?
本文介绍了如何清洁在code整个asp.net页面的背后?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
假如我有UI和code后面的aspx页面。
Suppose I have a aspx page with UI and code behind.
我在事件code Page_Load中,如:
I have code in event Page_Load like:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Me.Response.Write("Clean the page")
'.....
End Sub
但页面仍然呈现出与整个事情的ASPX(所有标记)。
but the page still render out with whole thing in aspx(all those markup).
我要的是唯一的显示在浏览器的用户清洁页。
怎么办呢?
What I want is the only display "Clean the page" in browser for user. How to do it?
推荐答案
这样的:
Response.Clear();
Response.ClearHeaders();
也许你会想要将它与合并:
Probably you will want to combine it with a:
Response.End();
这篇关于如何清洁在code整个asp.net页面的背后?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文