Re: Shoving dynamic code in the middle of a page.



Hi Jeffrey,

You can put a Placeholder control there and in your codebehind, add controls
you create to the placeholder's Controls collection.

Ken

"UJ" <fred@xxxxxxxxxxx> wrote in message
news:uYDpoMSYFHA.796@xxxxxxxxxxxxxxxxxxxxxxx
> I'm a newbie to this so please excuse the level of question. My question
> is how can I dynamically create a table in the middle of a page without
> having to build the entire page dynamically? I have code to build the
> string that will generate the table. (This is all to solve the problem of
> when a person clicks a checkbox in a datagrid, there's no way of knowing
> what record it belongs to - see my previous post)
>
> Here's what my code would look like ideally:
>
> <html>
> <body>
> <form>
> Isn't this a pretty page?
>
> (Some kind of code that would build all the controls I need.
> Ideally this code would be a function that is in the codebehind page)
>
> Done creating my stuff.
> </form>
> </body>
> <html>
>
> Thanks again in advance.
>
> Jeffrey.
>


.



Relevant Pages

  • Re: Web Controls/User Controls - Access Modifier
    ... Web Page Class (aspx - inherits Code Behind) ... ASP.Net 1.1 is a bit confusing because a Template is ... > using the CodeBehind method. ... > UserControl Template - both are Templated Controls), ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Newbie Question: Moving code to external file
    ... Codebehind classes ... the codebehind assembly (roughly equivalent to a .dll) for the webproject. ... toolbar control could be written as custom web controls. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Structure of website
    ... Then, in my controls, open the dataset (or my own ... Basically, I want to have a base class that on the first call to the page, ... which can pass to the UC codebehind. ... derived class, which derives from usercontrol. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Latebinding or Webcontrols for best performance?
    ... Depends on what you're doing in the code-behind i.e. how many controls are ... > to account for creation and gc of all the webcontrols. ... > if you can accomplish it from codebehind, ... >>> I currently populate my datagrids manually from a ...
    (microsoft.public.dotnet.framework.aspnet)
  • public functions
    ... System.Web.UI.Page" in the codebehind with "Inherits Page_Base". ... Now I want to extend the accessibility to the HostRequested function to ... The controls, however, cannot recognize the ...
    (microsoft.public.dotnet.framework.aspnet)