Adding layout elements within custom control

Ask a Question related to ASP.NET Building Controls, Design and Development.

  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. Similar Questions and Discussions

    1. adding a custom vb.net winform control in asp.net
      greetings all, I am new to adding controls to a webpage, i have created a control in vb.net and build the solution, I then took the dll file and...
    2. Dynamically adding custom control
      Im trying to dynamically add a user control for a webform but it is not appearing when I run the form. I have pasted the code that I am using. ...
    3. Dynamically adding a custom control
      Steven Im getting in a bit of a mess with this. What I want to end up with is a set of controls for editing / displaying fields on a webform. I...
    4. Adding Validator Control at runtime in a Custom Control
      Hi Wim, How do we link the TextBox to this validator control class in runtime ? Could you please tell. Thanks _ Muds. Wim Hollebrandse...
    5. Adding a ButtonColumn to a DataGrid in a Custom Control
      I am trying to add a buttoncolumn to a Datagrid I am dynamicaly adding to a custom control (code below). The Datagrid outputs fine but all of the...
  3. #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@gmail.com> ha scritto nel messaggio
    news:1154395988.544550.140890@b28g2000cwb.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

Posting Permissions

  • You may not post new threads
  • You may 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