Saturday, March 24, 2012

Newbie Help -- .net and static HTML

Whew... hopefully my questions will get more elaborate as I use this more... this is probably as basic as I could get.
I come from a web design background... haven't done web programmingbefore barring some CFML. Now I'm responsible for coming up to speed onASP.net + VB for work needs...
So here's my basic question.
I created a graphical HTML header for a website I'm building. Iwant to make this a global header across the application, so I want tocall it in each time a page loads. Also, I have navigationbuttons that I want to be able to program VB behind to perform certainactions (mostly just page loads). I really don't know how to addthis header to my web application so as to be able to call it in...once its created, Im confident I can muddle through creating objectsfrom the buttons and programming the VB behind them that I need.
I just frankly can't figure out how to integrate the HTML header (and graphics) with the web application.
Can anyone enlighten me? I couldnt' find an article here about that, so I'm posting.
Thanks so much!
Welcome to Asp.net!
ASP.NEt provides you with the capability to create user controls. UserControls is just like a page but it does not contain the form tag. UserControls are used to divide the pages into small sections so that pageis easy to modify in the future.
So, in your case you can make a user control for the header, footer.Once the user control is created you can simply place it (Drag andDrop) on the page and thats it. Your user control can be placed in allthe pages you have. If later you want to change something in the headersection of the page you simply change the user control and thats it.Once the user control is changed it will take effect on all the pagesthat contain it.
A good tutorial isExtensive Examination of User Controls.


That's pretty much what I needed to know, thanks very much =)
I'll check out that tutorial right now. Thanks again!

0 comments:

Post a Comment