Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Rendering Issue

Rendering Issue

Scheduled Pinned Locked Moved ASP.NET
helpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Taurian110
    wrote on last edited by
    #1

    I created a baseClass to provide Header and Footer for my Page that was inherited from baseClass. If I dont do anything in my Webform.aspx every thing works great, but if I try to write something like this"public void iSplit() { string a; string[] b; a = "John,Smith,9999,Somewhere In,TX,75038"; b = a.Split(','); /*Response.Write(b[1].ToString() + "here"); Response.Write(b.GetUpperBound(0));*/ PageHTML = PageHTML + ""; for(int i=0; i<= b.GetUpperBound(0); i++) { PageHTML = PageHTML + ""; } PageHTML = PageHTML + " " + (i + 1) + " " + b[i] + " "; } protected override void Render(HtmlTextWriter writer) { writer.Write(PageHTML); }
    The only thing I see on page is stuff from PageHTML and my baseClass stuff is all gone!:(( What will be the best way to render my WebPage.aspx contents in a way that I can keep my header and footer as well as my WebPage.aspx contents? Let me know if I need to clerify it a little more. thanks a lot.

    M 1 Reply Last reply
    0
    • T Taurian110

      I created a baseClass to provide Header and Footer for my Page that was inherited from baseClass. If I dont do anything in my Webform.aspx every thing works great, but if I try to write something like this"public void iSplit() { string a; string[] b; a = "John,Smith,9999,Somewhere In,TX,75038"; b = a.Split(','); /*Response.Write(b[1].ToString() + "here"); Response.Write(b.GetUpperBound(0));*/ PageHTML = PageHTML + ""; for(int i=0; i<= b.GetUpperBound(0); i++) { PageHTML = PageHTML + ""; } PageHTML = PageHTML + " " + (i + 1) + " " + b[i] + " "; } protected override void Render(HtmlTextWriter writer) { writer.Write(PageHTML); }
      The only thing I see on page is stuff from PageHTML and my baseClass stuff is all gone!:(( What will be the best way to render my WebPage.aspx contents in a way that I can keep my header and footer as well as my WebPage.aspx contents? Let me know if I need to clerify it a little more. thanks a lot.

      M Offline
      M Offline
      minhpc_bk
      wrote on last edited by
      #2

      Because you don't call the base.Write method in the overriden method Write, so the base class does not render anything.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups