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

  • SEARCH
  • Home
  • 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 8067089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T12:10:33+00:00 2026-06-05T12:10:33+00:00

I got a normal ascx-Page which contains HTML-Parts as well as code behind. These

  • 0

I got a “normal” ascx-Page which contains HTML-Parts as well as code behind. These elements should all be shown in normal conditions (works).

Now I want to be able to set a request-parameter which causes the page zu render differently. Then it sends the information on that page not human-readable but for a machine:

 string jsonProperty = Request["JSonProperty"];
                if (!string.IsNullOrEmpty(jsonProperty))
                {                    
                    Response.Clear();
                    Response.Write(RenderJSon());
                  //  Response.Close();
                    return;

This code is inside the Page_PreRender.
Now my problem is:The string is correctly sent to the browser but the “standard” html-content is still rendered after that.

When I remove the “Response.Close();” Comment I receive an “ERR_INVALID_RESPONSE”

Any clue how to solve this without creating an additional Page?

  • 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-05T12:10:35+00:00Added an answer on June 5, 2026 at 12:10 pm

    Try adding Response.End()

    Sends all currently buffered output to the client, stops execution of the page, and raises the EndRequest event.

    Also, as @Richard said, add

    context.Response.ContentType = "application/json";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We've got a winforms LOB application, which under normal circumstances should be started from
Okay, I've got my normal app which is in portrait mode. I can force
I've got the following code: $(ul.relatedAlbums li).hover(function(){ $(this).css({fontWeight:bold}); }, function(){ $(this).css({fontWeight:normal}); }); I've heard
I've got a tr:table that I need to style using CSS. All the normal
In my data model, I've got a field that should be admin-editable only. Normal
I've got a normal password field from which I would like to get the
I've got a page with a normal form with a submit button and some
I use evil, which got (defcustom evil-shift-width 4 The offset used by \\<evil-normal-state-map>\\[evil-shift-right] \
i got email with such symbols in html code, as: 3D, =BB, =, =A0
I am sending a normal html email message to people using PHP of which

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.