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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:53:10+00:00 2026-05-27T18:53:10+00:00

So I am doing clientside XSL Transformations. If someone requests Dashboard.aspx it will create

  • 0

So I am doing clientside XSL Transformations.

If someone requests Dashboard.aspx it will create all the XML data and by convention include a reference to DashboardXSL.aspx in the XML. This will then be sent over the the client and create the XHTML.

All my aspx pages that serve XML are derived from XMLPage instead of Page, right now I am simply setting the content type there on Page_PreLoad. On the actual Page_Load all the data for the page is being gathered up on ITS Page_Load which is then written to the page via <%=XMLData%>

What I’d like to do is at some point in the process, I am guessing on my XMLPage subclass Page_Render [or PreRender] intercept all the accumulated XML and do a server side transformation and stop the page from being delivered as asp.net would normally deliver it.

Does anyone know how to do this?

Thanks in advance!
Here is my XMLPage class
I am including some code so you have something to visualize

        public class XMLPage : System.Web.UI.Page
    {
        protected void Page_PreLoad(object Sender, EventArgs e)
        {
            Response.ContentType = "text/xml";
            if (Request.Browser.IsBrowser("IE"))
            { //Just testing this out, not production code ! :p

                    Response.Write(@"<?xml 
version=""1.0"" encoding=""ISO-8859-1""?>
<oohru>Browser is IE</oohru>");
                    Response.End();
                    Response.Flush();
                }
            }
        }

Here is Dashboard.aspx

    <%@ Page Title="Oohru Dashboard" Language="C#"  AutoEventWireup="true" 
EnableViewState="false"
    CodeBehind="Dashboard.aspx.cs" Inherits="OohruWeb.Dashboard"
 MasterPageFile="~/MasterPages/LoggedInXML.Master" %>
<asp:Content ContentPlaceHolderID="XMLPageData" runat="server">
    <%=DashboardBlogs%>
</asp:Content>

Here is the code behind Dashboard.aspx.cs

    public partial class Dashboard : OohruWeb.PageOverloads.XMLPage
    {
        public string DashboardBlogs="";
        protected void Page_Load(object sender, EventArgs e)
        {
            DbaseExecSpWithRecordset Sproc = new DbaseExecSpWithRecordset();
            Sproc.SetSp("sproc_GetBlogPostsForDashboard");
            Sproc.AddParam("UserID", System.Data.SqlDbType.UniqueIdentifier, 
(Guid)Membership.GetUser().ProviderUserKey);
            SqlDataReader Dreader = Sproc.Execute();
            while (Dreader.Read())
            {
                DashboardBlogs += Dreader[0].ToString();
            }
            Dreader.Close();
            Sproc.Close();
            Sproc = null;

        }

The XSL file is DashboardXSL.aspx, the master page knows to supply this again on name convention. It’s too big to bother posting.

  • 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-05-27T18:53:10+00:00Added an answer on May 27, 2026 at 6:53 pm

    If the only purpose for the page is to render XML, then you might be much better off going with an HTTPHandler.

    In fact, you could just replace the existing physical page with a virtual page of the same name. You can generate the XML, transform it, and send it back to the client in response without having to worry about the aspx pipeline.

    If you need to work with the session state, you can just implement System.Web.SessionState.IRequiresSessionState in the handler and session state will be made available in the request.

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

Sidebar

Related Questions

Doing the below will reproduce my problem: New WPF Project Add ListView Name the
When doing an INSERT with a lot of data, ie: INSERT INTO table (mediumtext_field)
I have an XML document here that is served with a corresponding XSL file
OK, I have a client doing a POST to a server with some data.
I am doing some client side validation in ASP.NET MVC and I found myself
I am working with ASP.NET doing some client side javascript. I have the following
Sometimes I hear the argument against doing things on client side using javascript. People
Doing odd/even styling with jQuery is pretty easy: $(function() { $(.oddeven tbody tr:odd).addClass(odd); $(.oddeven
Doing an ajax get request works as expected using the following code: $.ajax({ type:
Doing my first SL4 MVVM RIA based application and i ran into the following

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.