How to respond without html in asp.net
asp.net, c#
Solution
Make sure in your `*.aspx` file, at the top you have `AutoEventWireup="true"`, if it's false (or not there?) your `Page_Load` event handler will not be called.
Also, make sure you compiled your page.
Another suggestion is to use a `Generic Handler` (ie `*.ashx`), these do not use the typical webforms lifecycle and might be better suited to what you're doing.
Problem
Easy question perhaps. Okay, I have a post to my page and need to respond with one string. in php, you could simply do something like this: ``` <?php die ("test"); ``` then you can place this page on a webserver and access it like this: ``` localhost/test.php ``` so, I need to do exact same thing in c#. When I try to respond with: ``` protected void Page_Load(object sender, EventArgs e) { Response.Write("test"); Response.End(); } ``` I'm getting: `"<html><head><style type="text/css"></style></head><body>test</body></html>"` as a response. How can I make asp.net to just return exact response, without html? I know that I probably missing some basic knowledge, but cannot find anything online.