VB.Net Template Idea Suggestions

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

  1. #1

    Default VB.Net Template Idea Suggestions

    Hi,

    I spent the entire weekend struggling to find a suitable tempalte solution
    for my site. Yes, user controls were good, but I needed one page that could
    control user controls on each adn every page of my site. Unfortuentaly, I
    was not able to find a solution to that, and have resorted to loading each
    control on each page individually.

    However, I was talking to a friend who also designs in .Net, and he came up
    with this idea, and I wanted to get some opinions on it.

    Instead of having 100 aspx pages and loading user controls into them, have 1
    aspx page with a placeholder, and load 100 ascx pages into them when needed.
    So default.aspx?page=1 would load page 1.ascx into the placeholder.
    default.aspx?page=99 would load page 99 into the placeholder. Therefor, I
    would only have one main page to control and keep track of, whereas all
    additional pages would be loaded when needed.

    Any downsides to this?

    Thanks!


    Jordan Marton Guest

  2. Similar Questions and Discussions

    1. any idea please??
      Hi all, I have one problem in my dashboard project.Any idea plz?? For my dashboard project, I have created one MXML component based on...
    2. Idea, is it possible ?
      I have no experience in flash, just an idea I wanted developed so I thought I would ask to see if people thought it was possible before seeking a...
    3. any idea how i can...
      Hi all does any one have an idea how I can make a stroke look like a paint brush stroke - i.e. varying thickness along its length, kind of a hand...
    4. Template Questions, Site Design Suggestions, ASP.NET Newbie
      Jordan, you need to use asp.net Page Templates. http://www.aspnetui.com/templates/ i am trying to do the same thing and still can't get it to...
    5. any idea what was used to do this?
      <http://www.geocities.com/fixedandsorted/crop.htm> what filter (if any) do you think was used to get the effect on the yellow background on the...
  3. #2

    Default Re: VB.Net Template Idea Suggestions

    You could have a base class that renders()'s the template and derive each
    page from this class and call the abstract "AddControls" method from the
    base class which is overridden in the dervied class, adds the controls
    specific to that page and writes out the rest of the template.

    I ran into a similar issue and found a way to use oo and usercontrols to
    acheive this site wide and a bit more (using some of the techniques
    discussed above), but it is still under development just now.

    regards,
    steven
    [url]http://www.stevenlivingstone.com[/url]
    [url]http://www.venturetogether.org[/url]

    "Jordan Marton" <JMarton@NOSPAMmarketaxess.com> wrote in message
    news:OBUAUpmWDHA.1512@TK2MSFTNGP11.phx.gbl...
    > Hi,
    >
    > I spent the entire weekend struggling to find a suitable tempalte solution
    > for my site. Yes, user controls were good, but I needed one page that
    could
    > control user controls on each adn every page of my site. Unfortuentaly, I
    > was not able to find a solution to that, and have resorted to loading each
    > control on each page individually.
    >
    > However, I was talking to a friend who also designs in .Net, and he came
    up
    > with this idea, and I wanted to get some opinions on it.
    >
    > Instead of having 100 aspx pages and loading user controls into them, have
    1
    > aspx page with a placeholder, and load 100 ascx pages into them when
    needed.
    > So default.aspx?page=1 would load page 1.ascx into the placeholder.
    > default.aspx?page=99 would load page 99 into the placeholder. Therefor, I
    > would only have one main page to control and keep track of, whereas all
    > additional pages would be loaded when needed.
    >
    > Any downsides to this?
    >
    > Thanks!
    >
    >

    Steven Livingstone Guest

  4. #3

    Default Re: VB.Net Template Idea Suggestions

    In theory, that's a good idea, but I see a few issues:
    1. How do you know to load #99 vs #98? In other words how are you going to
    keep track of all of these different User controls? Maybe numbering them is
    a bad idea. Maybe naming them something more "human readable" would be
    better.

    2. If you are not doing this in frames, a user could manipulate your URL
    and go to undesirable places, or break the flow of your site.

    Michael


    "Jordan Marton" <JMarton@NOSPAMmarketaxess.com> wrote in message
    news:OBUAUpmWDHA.1512@TK2MSFTNGP11.phx.gbl...
    > Hi,
    >
    > I spent the entire weekend struggling to find a suitable tempalte solution
    > for my site. Yes, user controls were good, but I needed one page that
    could
    > control user controls on each adn every page of my site. Unfortuentaly, I
    > was not able to find a solution to that, and have resorted to loading each
    > control on each page individually.
    >
    > However, I was talking to a friend who also designs in .Net, and he came
    up
    > with this idea, and I wanted to get some opinions on it.
    >
    > Instead of having 100 aspx pages and loading user controls into them, have
    1
    > aspx page with a placeholder, and load 100 ascx pages into them when
    needed.
    > So default.aspx?page=1 would load page 1.ascx into the placeholder.
    > default.aspx?page=99 would load page 99 into the placeholder. Therefor, I
    > would only have one main page to control and keep track of, whereas all
    > additional pages would be loaded when needed.
    >
    > Any downsides to this?
    >
    > Thanks!
    >
    >

    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system ([url]http://www.grisoft.com[/url]).
    Version: 6.0.504 / Virus Database: 302 - Release Date: 7/24/2003


    Michael Pearson Guest

  5. #4

    Default Re: VB.Net Template Idea Suggestions

    Well more precisely...

    [url]www.mydomain.com/default.aspx[/url] would be the main page.

    Then default.aspx?page=new_user would dynamically load the new user control
    into a panel. And default.aspx?page=contact would load a contact form. It
    doesn't have to be based on numbers, or pages can be by numbers and I can
    use a nice big select statement to get the right page, or link the number to
    a table in a database and pull the correct user control file...

    If the page wasn't found, a special user control could be loaded...

    Jordan

    "Michael Pearson" <michaelp_extrajunktoremove@televox.com> wrote in message
    news:OvSQaisWDHA.1632@TK2MSFTNGP11.phx.gbl...
    > In theory, that's a good idea, but I see a few issues:
    > 1. How do you know to load #99 vs #98? In other words how are you going
    to
    > keep track of all of these different User controls? Maybe numbering them
    is
    > a bad idea. Maybe naming them something more "human readable" would be
    > better.
    >
    > 2. If you are not doing this in frames, a user could manipulate your URL
    > and go to undesirable places, or break the flow of your site.
    >
    > Michael
    >
    >
    > "Jordan Marton" <JMarton@NOSPAMmarketaxess.com> wrote in message
    > news:OBUAUpmWDHA.1512@TK2MSFTNGP11.phx.gbl...
    > > Hi,
    > >
    > > I spent the entire weekend struggling to find a suitable tempalte
    solution
    > > for my site. Yes, user controls were good, but I needed one page that
    > could
    > > control user controls on each adn every page of my site. Unfortuentaly,
    I
    > > was not able to find a solution to that, and have resorted to loading
    each
    > > control on each page individually.
    > >
    > > However, I was talking to a friend who also designs in .Net, and he came
    > up
    > > with this idea, and I wanted to get some opinions on it.
    > >
    > > Instead of having 100 aspx pages and loading user controls into them,
    have
    > 1
    > > aspx page with a placeholder, and load 100 ascx pages into them when
    > needed.
    > > So default.aspx?page=1 would load page 1.ascx into the placeholder.
    > > default.aspx?page=99 would load page 99 into the placeholder. Therefor,
    I
    > > would only have one main page to control and keep track of, whereas all
    > > additional pages would be loaded when needed.
    > >
    > > Any downsides to this?
    > >
    > > Thanks!
    > >
    > >
    >
    >
    > ---
    > Outgoing mail is certified Virus Free.
    > Checked by AVG anti-virus system ([url]http://www.grisoft.com[/url]).
    > Version: 6.0.504 / Virus Database: 302 - Release Date: 7/24/2003
    >
    >

    Jordan Marton Guest

  6. #5

    Default Re: VB.Net Template Idea Suggestions

    Well, I guess that's just as good an idea as any. I'm not sure I like the
    giant select case. I suspect that's going to be a bear to maintain
    depending on how many items you have in your select list.

    Good luck with it man!

    Michael
    "Jordan Marton" <JMarton@NOSPAMmarketaxess.com> wrote in message
    news:ejX1CvyWDHA.1748@TK2MSFTNGP12.phx.gbl...
    > Well more precisely...
    >
    > [url]www.mydomain.com/default.aspx[/url] would be the main page.
    >
    > Then default.aspx?page=new_user would dynamically load the new user
    control
    > into a panel. And default.aspx?page=contact would load a contact form. It
    > doesn't have to be based on numbers, or pages can be by numbers and I can
    > use a nice big select statement to get the right page, or link the number
    to
    > a table in a database and pull the correct user control file...
    >
    > If the page wasn't found, a special user control could be loaded...
    >
    > Jordan
    >
    > "Michael Pearson" <michaelp_extrajunktoremove@televox.com> wrote in
    message
    > news:OvSQaisWDHA.1632@TK2MSFTNGP11.phx.gbl...
    > > In theory, that's a good idea, but I see a few issues:
    > > 1. How do you know to load #99 vs #98? In other words how are you
    going
    > to
    > > keep track of all of these different User controls? Maybe numbering
    them
    > is
    > > a bad idea. Maybe naming them something more "human readable" would be
    > > better.
    > >
    > > 2. If you are not doing this in frames, a user could manipulate your
    URL
    > > and go to undesirable places, or break the flow of your site.
    > >
    > > Michael
    > >
    > >
    > > "Jordan Marton" <JMarton@NOSPAMmarketaxess.com> wrote in message
    > > news:OBUAUpmWDHA.1512@TK2MSFTNGP11.phx.gbl...
    > > > Hi,
    > > >
    > > > I spent the entire weekend struggling to find a suitable tempalte
    > solution
    > > > for my site. Yes, user controls were good, but I needed one page that
    > > could
    > > > control user controls on each adn every page of my site.
    Unfortuentaly,
    > I
    > > > was not able to find a solution to that, and have resorted to loading
    > each
    > > > control on each page individually.
    > > >
    > > > However, I was talking to a friend who also designs in .Net, and he
    came
    > > up
    > > > with this idea, and I wanted to get some opinions on it.
    > > >
    > > > Instead of having 100 aspx pages and loading user controls into them,
    > have
    > > 1
    > > > aspx page with a placeholder, and load 100 ascx pages into them when
    > > needed.
    > > > So default.aspx?page=1 would load page 1.ascx into the placeholder.
    > > > default.aspx?page=99 would load page 99 into the placeholder.
    Therefor,
    > I
    > > > would only have one main page to control and keep track of, whereas
    all
    > > > additional pages would be loaded when needed.
    > > >
    > > > Any downsides to this?
    > > >
    > > > Thanks!
    > > >
    > > >
    > >
    > >
    > > ---
    > > Outgoing mail is certified Virus Free.
    > > Checked by AVG anti-virus system ([url]http://www.grisoft.com[/url]).
    > > Version: 6.0.504 / Virus Database: 302 - Release Date: 7/24/2003
    > >
    > >
    >
    >

    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system ([url]http://www.grisoft.com[/url]).
    Version: 6.0.504 / Virus Database: 302 - Release Date: 7/24/2003


    Michael Pearson 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