Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7890983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:29:58+00:00 2026-06-03T06:29:58+00:00

Easy question perhaps. Okay, I have a post to my page and need to

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T06:29:59+00:00Added an answer on June 3, 2026 at 6:29 am

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This may be an easy question and perhaps I am missing something here. The
Easy question...I know a lot of the values ahead of time, and need to
I have an easy question, though I'm not sure if it's doable or not:
Hopefully an easy question. If I have an object and I want to call
Perhaps there is an easy solution for my problem but I simply cannot seem
An easy follow up From an earlier question ( Date functions in PHP )
This is kind of a Java trivia question perhaps. I have used the Stack
This is an easy question, but I cannot seem to solve it. My html
This is an easy question and I want to confirm with you experts! I
Here is an easy question. How does the industry refer to storing mulitple boolean

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.