How to set Response Header before Server.Transfer in Asp.Net?

后端 未结 3 848
陌清茗
陌清茗 2021-01-13 13:41

I have a page where based on certain conditions I am either doing a Response.Redirect or Server.Transfer. Now I want to add a header for both the cases. So I am doing the fo

3条回答
  •  春和景丽
    2021-01-13 14:21

    Add header in Source.aspx and don't Change the header in Destination.aspx page.

    If you want to display the result page as html then you should add header content-type as text/html

提交回复
热议问题