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. Difference between manual rendering and rendering by aspx

Difference between manual rendering and rendering by aspx

Scheduled Pinned Locked Moved ASP.NET
javahtmltoolshelpquestion
5 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
    thebread
    wrote on last edited by
    #1

    hello all, i have the following problem: in a page i render the html output of a calendar control manually by cal.render(writer) in first second it look ok but unfortunately there is no functionality rendered to the output. That means no links, no script code, ... Is there a trick to render the needed java script code to the resulting HTML? thanks, bernd

    T 1 Reply Last reply
    0
    • T thebread

      hello all, i have the following problem: in a page i render the html output of a calendar control manually by cal.render(writer) in first second it look ok but unfortunately there is no functionality rendered to the output. That means no links, no script code, ... Is there a trick to render the needed java script code to the resulting HTML? thanks, bernd

      T Offline
      T Offline
      thebread
      wrote on last edited by
      #2

      hmm, you may think this does not make sense, but i try to create some aspx stuff by ironPython and so i haven't not a real aspx enviroment. That means i haven't a page_load event or something like that. Does someone of you know some details about the rendering process of webcontrolls in common? For example which method renders script code, who call's this method and when is it called? i'll be happy about any suggestion. Thanks Bernd

      M 1 Reply Last reply
      0
      • T thebread

        hmm, you may think this does not make sense, but i try to create some aspx stuff by ironPython and so i haven't not a real aspx enviroment. That means i haven't a page_load event or something like that. Does someone of you know some details about the rendering process of webcontrolls in common? For example which method renders script code, who call's this method and when is it called? i'll be happy about any suggestion. Thanks Bernd

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

        Hi there, You may want to look at the Page Object Model[^] and Page Life Cycle[^] that may give you some ideas. Basically, the common script which can be reused in the web page will be emitted by the Page instance, and the control-specific script can be rendered by the control itself. Which script are you talking about?

        T 1 Reply Last reply
        0
        • M minhpc_bk

          Hi there, You may want to look at the Page Object Model[^] and Page Life Cycle[^] that may give you some ideas. Basically, the common script which can be reused in the web page will be emitted by the Page instance, and the control-specific script can be rendered by the control itself. Which script are you talking about?

          T Offline
          T Offline
          thebread
          wrote on last edited by
          #4

          hey minhpc_bk, nice to read you! i.E the function '__doPostBack' and all call's to that function are missing. actualy no links aren't rendered. you can take a look at www.gmc.li. First i'll check out your posted link's. thanks, bernd -- modified at 10:29 Monday 2nd October, 2006 stop - the function will be rendered!! In my control isn't set the Property 'Page' which can explain a lot ;) -- modified at 16:51 Monday 2nd October, 2006 false alarm :( the script was rendered by another aspx control. still with no idea. isn't there a property 'enableClientScripting' ore something else? Please take a look at the code[^] here, maybe one of you can see my big mistake.

          M 1 Reply Last reply
          0
          • T thebread

            hey minhpc_bk, nice to read you! i.E the function '__doPostBack' and all call's to that function are missing. actualy no links aren't rendered. you can take a look at www.gmc.li. First i'll check out your posted link's. thanks, bernd -- modified at 10:29 Monday 2nd October, 2006 stop - the function will be rendered!! In my control isn't set the Property 'Page' which can explain a lot ;) -- modified at 16:51 Monday 2nd October, 2006 false alarm :( the script was rendered by another aspx control. still with no idea. isn't there a property 'enableClientScripting' ore something else? Please take a look at the code[^] here, maybe one of you can see my big mistake.

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

            To work around the error of not being placed outside the server form element, you'll have two options here: + Extend the Page class, override the VerifyRenderingInServerForm method and leave it empty. + Extend the Calendar control and override the Render method to skip the calling to the VerifyRenderingInServerForm of the Page instance. Below is the sample code for the first option which IMO is much simpler:

            public class ExPage : Page
            {
            public override void VerifyRenderingInServerForm(Control control)
            {
            //Leave the method empty instead of
            //making sure the control is not placed outside the server form.
            }
            }

            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