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 8576653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:58:23+00:00 2026-06-11T19:58:23+00:00

I have a script based on .NET & Razor that renders on a webpage

  • 0

I have a script based on .NET & Razor that renders on a webpage immediately, before any html elements have been rendered. Apart from a MySQL query, the script is solely writing some of the data onscreen using:

Response.Write("Some data");

I’m using Umbraco v4.7.2 and would like the script to render where I inserted the macro, after the whole document has loaded. I’ve tried wrapping my script in an event handler, similar to the following, but this isn’t recognised and causes the whole script to render as text:

protected void Page_LoadComplete(object sender, EventArgs e)  {
    Response.Write("Page Load Complete!");
}

Event handlers seem to be used frequently but I don’t quite understand the Umbraco documentation, is there something I need to reference in my razor script in order for them to render? Is there a ‘cs’ file I need to reference?

I’ve also tried using the ‘RenderEvent’ attribute, which based on my script doesn’t appear to do anything.

  • 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-11T19:58:25+00:00Added an answer on June 11, 2026 at 7:58 pm

    I finally found out the simplest solution to this; using @Html.Raw() instead of Response.Write(“Some data”) did what I needed to do.

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

Sidebar

Related Questions

I have a script that registers users based on their user input. This uses
I have a PHP script that creates other PHP files based on user input.
I have a script that displays images based on certain conditions. When none of
I have written a script which dynamically creates a html table based off server
I have a solution that contains an ASP.NET Web Site (file-based) project. I'm currently
I have a script which allows to display favicon based on the url over
I have a script which allows to display favicons based on the url: Example
I have a button script to change the buttons in a frame based on
Hi I have a shell script which should run based on the return of
I have script that reads remote file content and writes it to local server.

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.