Professional Web Applications Themes

Adding layout elements within custom control - ASP.NET Building Controls

Hi all, I have a custom control that I use within forms that contains form inputs and validator controls. At the moment I'm overriding the Render method of my custom control and using the HtmlTextWriter object to render the layout elements and the Control.RenderControl method in the appropriate places to render the child controls in the right place. I've run into a problem where literal content (i.e. <%= SomeVariable %>) is not being rendered, and from what I can understand, it's because of the way I'm rendering the child controls. Could someone please advise me of the best way to ...

  1. #1

    Default Adding layout elements within custom control

    Hi all,

    I have a custom control that I use within forms that contains form
    inputs and validator controls. At the moment I'm overriding the Render
    method of my custom control and using the HtmlTextWriter object to
    render the layout elements and the Control.RenderControl method in the
    appropriate places to render the child controls in the right place.

    I've run into a problem where literal content (i.e. <%= SomeVariable
    %>) is not being rendered, and from what I can understand, it's because
    of the way I'm rendering the child controls.

    Could someone please advise me of the best way to add layout elements
    around the child controls and with the literal content intact? Do I
    need to override another method and add the extra layout elements to
    the Controls collection?

    Thanks,

    Paul

    paul.hester@gmail.com Guest

  2. #2

    Default Re: Adding layout elements within custom control

    hi Paul, in case you missed my reply to this same post on the WebControls
    group, here it is :
    [url]http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet.webcontro ls/browse_thread/thread/c9f142ee693fd3d0/9526ae015a40888f?lnk=st&q=&rnum=1&hl=en#9526ae015a 40888f[/url]

    Regards,
    Alessandro Zifiglio
    [url]http://www.AsyncUI.net[/url]

    <paul.hester> ha scritto nel messaggio
    news:1154395988.544550.140890b28g2000cwb.googlegr oups.com...
    > Hi all,
    >
    > I have a custom control that I use within forms that contains form
    > inputs and validator controls. At the moment I'm overriding the Render
    > method of my custom control and using the HtmlTextWriter object to
    > render the layout elements and the Control.RenderControl method in the
    > appropriate places to render the child controls in the right place.
    >
    > I've run into a problem where literal content (i.e. <%= SomeVariable
    > %>) is not being rendered, and from what I can understand, it's because
    > of the way I'm rendering the child controls.
    >
    > Could someone please advise me of the best way to add layout elements
    > around the child controls and with the literal content intact? Do I
    > need to override another method and add the extra layout elements to
    > the Controls collection?
    >
    > Thanks,
    >
    > Paul
    >

    Alessandro Zifiglio Guest

Similar Threads

  1. adding a custom vb.net winform control in asp.net
    By ElCapitan in forum ASP.NET Building Controls
    Replies: 1
    Last Post: March 14th, 04:15 PM
  2. Dynamically adding custom control
    By Terry Holland in forum ASP.NET Building Controls
    Replies: 11
    Last Post: November 30th, 02:20 AM
  3. Dynamically adding a custom control
    By Terry Holland in forum ASP.NET Building Controls
    Replies: 1
    Last Post: November 24th, 07:16 AM
  4. Adding Control programmatically in Custom Designer
    By Tom in forum ASP.NET Building Controls
    Replies: 0
    Last Post: June 14th, 08:11 PM
  5. Adding Validator Control at runtime in a Custom Control
    By mudasir.ahmed@gmail.com in forum ASP.NET Building Controls
    Replies: 1
    Last Post: December 17th, 09:14 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139