Seeking Help About Web Templates with ASP 1.1

G

Guest

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

Darren Kopp

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

Guest

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

Darren Kopp

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/
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top