Template Questions, Site Design Suggestions, ASP.NET Newbie

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

  1. #1

    Default Re: Template Questions, Site Design Suggestions, ASP.NET Newbie

    Jordan, you need to use asp.net Page Templates.

    [url]http://www.aspnetui.com/templates/[/url]

    i am trying to do the same thing and still can't get it to work the way i
    want to. :(


    "Jordan Marton" <JMarton@HAHAmarketaxess.com> wrote in message
    news:Op3rtuoVDHA.2260@TK2MSFTNGP09.phx.gbl...
    > Hi There!
    >
    > This is my first post to these newsgroups, so I hope I'm asking in the
    right
    > place. I am currently a comfrotable ASP 3.0 developer, and use Dreamweaver
    > MX and Access databases to make my sites. One of the handiest features of
    DW
    > was templates, as it enabled me to keep all pages constant.
    >
    > As I am now learning ASP.NET and have just purchased VisualBasic.Net 2003,
    I
    > was wondering if it is possible to achieve the same sort of "template"
    site
    > design as I am yused to.
    >
    > I understand that user controls can be included on every page, and
    therefor
    > I'd only have to edit each control to change the site. But I mean if I
    need
    > to add an additional user control to every page, then thats a lot harder
    > than addining a new control once to the main template and having all other
    > pages inherit that.
    >
    > Any ideas comments suggestions?
    >
    > Thanks
    > Jordan
    >
    >

    suzy Guest

  2. Similar Questions and Discussions

    1. Flash Site design questions
      1. After creating my site, I created 3 buttons, that will go to the respective frames. Why is it that when I click the first button (which was...
    2. comments & suggestions for my site design
      hi, can anyone offer any feedback on my site? not sure if i should go with a different sort of look or style. thanks! denise Referring...
    3. menu slice lines appearing on site / site visit/suggestions please TIA
      The following site: http://www.peterperret.com/ has a fireworks MX menu set. When mouseover occurs on the menu items (first two are active), it...
    4. Firewall and Mailserver questions - suggestions wanted.
      -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hej Guys, I am in the processes of designing/building up a new firewall and mailserver for my...
    5. 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...
  3. #2

    Default Re: Template Questions, Site Design Suggestions, ASP.NET Newbie

    For templates:
    Create a class in your ASP.net Project and have it inherit from the Page object like this:
    Public Class cMyTemplate : Inherits System.Web.UI.Page

    then you'll need to override teh Render method like so

    Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter)

    'Create your header here with response.writes etc etc

    mybase.render(writer)

    'create your footer here



    When you add a new webform to the project, look in the code behind file. You'll see at the top that it inherits from System.Web.UI.Page. Change System.Web.UI.Page to cMyTemplate (or whatever you called it).

    Now, when your new webform is rendered, it will write out a header, write out whatever is in the webform (that's the mybase.render ) and then render out a footer.

    It's quick and fast. Also, if you look at teh IBuySpy portal example, they give you a another way to do similar things with WebUserControls. A Web usercontrol is similar to an Include fiel in ASP 3.0



    Michael

    "Jordan Marton" <JMarton@HAHAmarketaxess.com> wrote in message news:Op3rtuoVDHA.2260@TK2MSFTNGP09.phx.gbl...
    > Hi There!
    >
    > This is my first post to these newsgroups, so I hope I'm asking in the right
    > place. I am currently a comfrotable ASP 3.0 developer, and use Dreamweaver
    > MX and Access databases to make my sites. One of the handiest features of DW
    > was templates, as it enabled me to keep all pages constant.
    >
    > As I am now learning ASP.NET and have just purchased VisualBasic.Net 2003, I
    > was wondering if it is possible to achieve the same sort of "template" site
    > design as I am yused to.
    >
    > I understand that user controls can be included on every page, and therefor
    > I'd only have to edit each control to change the site. But I mean if I need
    > to add an additional user control to every page, then thats a lot harder
    > than addining a new control once to the main template and having all other
    > pages inherit that.
    >
    > Any ideas comments suggestions?
    >
    > Thanks
    > Jordan
    >
    >

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