Seeking Help About Web Templates with ASP 1.1

Discussion in 'ASP .Net' started by =?Utf-8?B?Um9iZXJ0IFcu?=, Mar 31, 2006.

  1. I'm an accomplished C# WinForms programmer but am now trying to get quickly
    up to speed building websites. I current use ASP.net 1.1 and C#.

    From the get go, it was clear to me to build web user controls that would
    contain such items as the Header, the Sidebar, and the Footer. So I read
    these two articles:
    http://www.devx.com/dotnet/Article/18011
    http://www.codeproject.com/aspnet/PageFramework.asp?select=957460&df=100&forumid=102656&exp=0

    But, being new to this kind of programming, I've struggled with this every
    point along the way. As an example, I want to have a link button on the
    header. But this web control requires it to be wrapped in a <Form> </Form>
    construct. Fine. Except that apparently you can't have 2 of those
    constructs on the same page!

    With the first article I converted all the code over to C# but am getting
    really confused about how to implement it. With the 2nd article, though it
    runs okay right-off, when I tried inserting a link button in the header it
    failed for the reason stated above.

    So I'm wondering if anyone out there has some advice about how I could best
    move forward and turn the frustration into progress?

    --
    Robert W.
    Vancouver, BC
    www.mwtech.com
    =?Utf-8?B?Um9iZXJ0IFcu?=, Mar 31, 2006
    #1
    1. Advertising

  2. =?Utf-8?B?Um9iZXJ0IFcu?=

    Darren Kopp Guest

    Basically you just put everything in the form. You don't need more
    than one form, and the way that ASP.NET handles postbacks makes it
    impossible to have more than 1 form.

    Here's the trick. Rather than having different forms that submit to
    different url's, you take, say, a button, and puit the logic in the
    OnClick event. Then, as the event fires, your logic is run.

    Just as with WinForms, it's an event driven environment. Certain
    elements will raise events (through postbacks, or Async/AJAX events),
    which runs the associated logic. I suggest just keep banging through
    tutorials, as well as maybe grabbing an open source project, like
    DotNetNuke, so you can see how other people have done asp.net websites.


    However, you may want to start at a lower level than Dot Net Nuke if
    you are just starting. Maybe the PayPal Commerce starter kit
    (www.commercestarterkit.org)?

    Best of luck,
    Darren Kopp
    http://blog.secudocs.com/
    Darren Kopp, Mar 31, 2006
    #2
    1. Advertising

  3. Thanks for the inspiration, Darren! You know, when I started learning C#.net
    a year ago this month there were some similar "cloudy" days. But eventually
    it made sense and soon I was onto Reflection and doing some really great
    things.

    I just read this article and things seem to be working better now:
    http://www.codeproject.com/aspnet/page_templates.asp

    Thank you again for responding!

    --
    Robert W.
    Vancouver, BC
    www.mwtech.com



    "Darren Kopp" wrote:

    > Basically you just put everything in the form. You don't need more
    > than one form, and the way that ASP.NET handles postbacks makes it
    > impossible to have more than 1 form.
    >
    > Here's the trick. Rather than having different forms that submit to
    > different url's, you take, say, a button, and puit the logic in the
    > OnClick event. Then, as the event fires, your logic is run.
    >
    > Just as with WinForms, it's an event driven environment. Certain
    > elements will raise events (through postbacks, or Async/AJAX events),
    > which runs the associated logic. I suggest just keep banging through
    > tutorials, as well as maybe grabbing an open source project, like
    > DotNetNuke, so you can see how other people have done asp.net websites.
    >
    >
    > However, you may want to start at a lower level than Dot Net Nuke if
    > you are just starting. Maybe the PayPal Commerce starter kit
    > (www.commercestarterkit.org)?
    >
    > Best of luck,
    > Darren Kopp
    > http://blog.secudocs.com/
    >
    >
    =?Utf-8?B?Um9iZXJ0IFcu?=, Mar 31, 2006
    #3
  4. =?Utf-8?B?Um9iZXJ0IFcu?=

    Darren Kopp Guest

    No problem man. Yeah, once you see how the ASP.NET engine works (page
    class, inheritance, etc), then it's not too bad. It's that pesky html
    that I spend the most time with.

    Happy .NETing,
    Darren Kopp
    http://blog.secudocs.com/
    Darren Kopp, Mar 31, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Fred
    Replies:
    1
    Views:
    598
    Neredbojias
    Sep 26, 2005
  2. John Harrison

    using templates in templates

    John Harrison, Jul 31, 2003, in forum: C++
    Replies:
    8
    Views:
    380
    Torsten Curdt
    Jul 31, 2003
  3. JKop
    Replies:
    3
    Views:
    468
  4. Audrey Pratt
    Replies:
    0
    Views:
    3,273
    Audrey Pratt
    Dec 14, 2005
  5. recover
    Replies:
    2
    Views:
    802
    recover
    Jul 25, 2006
Loading...

Share This Page