For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > March 2006 > Seeking Help About Web Templates with ASP 1.1









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Seeking Help About Web Templates with ASP 1.1
Robert W.

2006-03-30, 10:01 pm

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/P...id=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 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

Darren Kopp

2006-03-30, 10:01 pm

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/

Robert W.

2006-03-30, 10:01 pm

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

Darren Kopp

2006-03-31, 7:03 pm

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/

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com