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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:30:10+00:00 2026-06-13T02:30:10+00:00

i have a asp.net file called header.aspx and which is a part of index.aspx,

  • 0

i have a asp.net file called header.aspx and which is a part of index.aspx, here is the code of the index.aspx:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="index" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
    <% Response.WriteFile("header.aspx"); %>
    <% Response.WriteFile("body.aspx"); %>
    <form runat="server">
    <%= content %>
    </form>
    </body>
    </html>

in header.aspx :

        <style type="text/css">
        .style1
        {
            width: 100%;
        }
    </style>
    <form id="form1" runat="server">
<table border="0" cellpadding="0" cellspacing="0" class="style1">
    <tr>
        <td><img src="images/Banner.jpg" width="990" height="150" /></td>
    </tr>
    <tr>
        <td>
            <img src="images/HomeTopMenu.jpg" width="140" height="30" /><img src="images/AboutTopMenu.jpg" width="140" height="30" /><img src="images/PublicationTopMenu.jpg" width="195" height="30" /><img src="images/FormTopMenu.jpg" width="205" height="30" /><img src="images/LinkTopMenu.jpg" width="160" height="30" /><img src="images/ContactTopMenu.jpg" width="150" height="30" />
            <% Response.Write("abc");  %>
        </td>
    </tr>
</table>
    </form>

when i run the index.aspx file, the <% Response.Write(“abc”); %> is displayed as plain text…

how to use asp.net code in header.aspx?

thanks

  • 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-13T02:30:11+00:00Added an answer on June 13, 2026 at 2:30 am

    Rather than using Response.WriteFile("header.aspx"), try using Server.Execute("header.aspx"). This will actually run the header.aspx file. Using Response.WriteFile gets the actual contents of the file, and does not execute it.

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

Sidebar

Related Questions

I have an asp.net page called prequal.aspx with a codebehind of prequal.aspx.cs. It works.
I have an ASP.NET page with a cs script file to take in data
I have an ASP.NET MVC page with multiple file uploads. After a failed post,
I have an ASP.net application which returns a binary PDF file (stored from the
I am registering java script to my Asp.net code behind file, which is working
OK, here is the question, I have a asp.net website, there is an aspx
I have an asp.net MVC application. There is an entity called File that it
I have a asp.net application which reads and updates and xml file in my
I am using ASP.NET Web Forms/C# .I am having a page Customer.aspx .I have
I'm developing a web application with asp.net and I have a file called Template.docx

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.