So now how do we use this thing
already how the page onto which I'd like to place this order hitter the before
footer page consists basically of some header information some content and now
to use footer I just take it and drag it onto the page went there we go cut
with above the right place I wanted to was drug or I do want it which must be
down here there we go so we now have the footer dragged onto the page will use
it done note that if you're coming from a previous version of Visual Studio you
might notice something different user controls in early versions of Visual
Studio.
Just displayed
a great blog on the page we drop them off in this version we actually see a
design time experience which contains the content of the user control the user
control has a task pane which includes two items edit user control and refresh
context refers content is useful if you modify the user control somewhere else
and edit user control takes you two as you might imagine the designer for the
user control itself because on this page I Really modified the user control
have to go to its designer when you track the user control onto the page Visual
Studio adds that only a reference to the user control.
Itself but up
here a register directive the register directive indicates they were using a
user control from some other source and the source areas footer.ASC X there's a
tag name we used to refer to this user control and attack prefix every control
in ASP.net page that is part of ASP.net and not HTML include some sort of tag
prefix like ASP will this user control as a tag prefix of you see one hears the
controls tag footer at ID for it every control has to have an idea of play
along with ASP.net.
And is set to
run@theserverlikeeveryotherASP.net control so it looks like a normal control it
feels like a normal control yet you decided using the ASC X designer here is to
prove a point I've gone a little farther on that before footer page there were
some header information I might like that on every page as well so I've created
a header.ASC X which includes a table and the image of that cute little puppy
and the header information and there is my header.ASC X ready to be dropped on
a page.
And I have a
page right dropped off completed.ASC X includes header.ASC X and footer is CX
and one more user control that will be discussing in the next chunk you can see
down here we have our user controls use the header here's the footer and here's
the state list will be talking about soon the only constant is defined here is
a text box and a button and if we look at the design for the page here's the
text box here's the button here's header.
0 comments:
Post a Comment