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 and Viewing Source in ASP.NET

Rendering and Viewing Source in ASP.NET

Scheduled Pinned Locked Moved ASP.NET
csharphtmlasp-netvisual-studiosysadmin
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.
  • M Offline
    M Offline
    MarkMokris
    wrote on last edited by
    #1

    I am trying to create an ASP.NET app using C# in VS 2005. I have a number of fixed Panels in the HTML, that I dynamically populate with server controls as the user utilizes the application. I have noticed that as I populate some of the panels dynamically, the controls render okay. But I do View Source in Internet Explorer and the generate HTML markup for the dynamically-generated controls is no where to be found in the source. However, they are there, rendered on the page. Does that make sense? Shouldn't I always be able to see the generated HTML from ASP.NET? Thanks, Mark

    A 1 Reply Last reply
    0
    • M MarkMokris

      I am trying to create an ASP.NET app using C# in VS 2005. I have a number of fixed Panels in the HTML, that I dynamically populate with server controls as the user utilizes the application. I have noticed that as I populate some of the panels dynamically, the controls render okay. But I do View Source in Internet Explorer and the generate HTML markup for the dynamically-generated controls is no where to be found in the source. However, they are there, rendered on the page. Does that make sense? Shouldn't I always be able to see the generated HTML from ASP.NET? Thanks, Mark

      A Offline
      A Offline
      Abhishek Sur
      wrote on last edited by
      #2

      If you are using normal html controls like div, input etc, it will be directly rendered as you made. The id of those controls might change sometimes. On the other hand asp.net controls renders differently. The asp.net controls renders normal html with some javascript and css etc to handle them. For instance : If you write <asp:label> it will render it as <span> This is because browser knows nothing other than HTML. So to work in Browsers the server side Handlers should render proper html. Moreover if you are using Masterpage, the Id of each control will be placed in such a way that its name contains the ContentPlaceholder name. This is just to ensure that there is no ambiguity between Masterpage controls and Content page controls. You can get the id generated for each control in the server side by calling its ClientId. Try to look carefully on your code.. .I think you will find them hidden somewhere. :rose::rose:

      Abhishek Sur


      My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB

      **Don't forget to click "Good Answer" if you like to.

      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