R
Rob Meade
Hi all,
Ok - this is a last ditched attempt to try and work out why what I want to
do is sooo complicated, and which is the best approach to do what I want...
The aim...
I want to create a standard template that myself and fellow developers here
will use for our applications, previously we did this in ASP using include
files etc - we have no moved to ASP.Net.
I want the template to exist at 'root' level on our domain - and then each
developer to be able to point back to it to use the common parts, in total
there are 9 sections to the template, 1 for the application, 2 sections
which are local to the applicaiton (logo and navigation) - the other 6 are
always going to be the same (hence wanting them at root level incase they
need to be changed etc).
If possible I would also like to be able to either, copy and paste a generic
template.aspx file from our /template applicaiton living on the root of the
server into a new application - ie, so its quick and easy for us all to
start building, or to have the 6 common sections available on the toolbar
within Visual Studio so that they can get the template.aspx file with the
table in it - and then drag and drop into the correct locations (the first
option would be preferred but it would be handy to have both)..
I have already tried using Web User Controls (.ascx files) - I created all
of the sections and then could drag and drop and it not only looked good but
it work! Then I discovered that these need to be in each application which
is no good for the 6 common parts as I want them only ONCE (incase they
change etc)...
I then moved to using Web Custom Controls - I must have clearly
misunderstood something along the way, because I created 6 Web Control
Libraries (one for each of the 6 sections) - following the instructions on
the MS site :
Once I had created them I used output.WriteLine to create the html content
for the sections - save each one - then built each one - this then created 6
..dll files locally on my PC (not on the server) - from here I followed the
instructions to add them to the toolbar - once I had them this far it was
then a case of dragging and dropping them onto the page in the html table -
I did this - but then I noticed that as I did it had created them in the
application under IIS - this got VERY confusing - as I thought I was trying
to create a set of global controls that I could point to - not have
duplicated on each application as they were used (otherwise I may have just
used the .ascx files)....
My next idea was that perhaps I needed to copy these 6 .dll's onto the
server in the first instance - so in my /template application on the server
I copied them all into the /bin directory - at this stage I was then unable
to add them to the toolbar - it didnt give any errors or anything - but it
wouldnt add them - and when I opened the /template application within the
solution explorer as well as the current application to drag them onto the
page it simply placed them in as hyperlinks!!
I am now completely - COMPLETELY - confused and going off of ASP.Net very
rapidly....(I dont like losing!)...
I'm now left wondering whether the .dll (Web Control Libraries) I created
were only supposed to live locally on the PC - in which case wouldnt I now
need to add them to each of the developers PC's for them to use them? If
so - this again means that if I ever change the template I'll have to let
everyone know and we'll still have to change all of the applications. I
just cant work out where I am going wrong - what I am supposed to be
doing...
I've trawled the net for the last few days this week, and most of last week
and do not seem to be able to find any examples of people doing the same
thing, and especially nothing written for Joe Newbie...
If anyone can offer me any help for this I would be EXTREMELY grateful - I
really am pulling my hair out - and I dont actually have much anyway!
Many thanks for reading my ASP.Net epic - and I hope someone can help
me.....
Best regards
Rob
Ok - this is a last ditched attempt to try and work out why what I want to
do is sooo complicated, and which is the best approach to do what I want...
The aim...
I want to create a standard template that myself and fellow developers here
will use for our applications, previously we did this in ASP using include
files etc - we have no moved to ASP.Net.
I want the template to exist at 'root' level on our domain - and then each
developer to be able to point back to it to use the common parts, in total
there are 9 sections to the template, 1 for the application, 2 sections
which are local to the applicaiton (logo and navigation) - the other 6 are
always going to be the same (hence wanting them at root level incase they
need to be changed etc).
If possible I would also like to be able to either, copy and paste a generic
template.aspx file from our /template applicaiton living on the root of the
server into a new application - ie, so its quick and easy for us all to
start building, or to have the 6 common sections available on the toolbar
within Visual Studio so that they can get the template.aspx file with the
table in it - and then drag and drop into the correct locations (the first
option would be preferred but it would be handy to have both)..
I have already tried using Web User Controls (.ascx files) - I created all
of the sections and then could drag and drop and it not only looked good but
it work! Then I discovered that these need to be in each application which
is no good for the 6 common parts as I want them only ONCE (incase they
change etc)...
I then moved to using Web Custom Controls - I must have clearly
misunderstood something along the way, because I created 6 Web Control
Libraries (one for each of the 6 sections) - following the instructions on
the MS site :
Once I had created them I used output.WriteLine to create the html content
for the sections - save each one - then built each one - this then created 6
..dll files locally on my PC (not on the server) - from here I followed the
instructions to add them to the toolbar - once I had them this far it was
then a case of dragging and dropping them onto the page in the html table -
I did this - but then I noticed that as I did it had created them in the
application under IIS - this got VERY confusing - as I thought I was trying
to create a set of global controls that I could point to - not have
duplicated on each application as they were used (otherwise I may have just
used the .ascx files)....
My next idea was that perhaps I needed to copy these 6 .dll's onto the
server in the first instance - so in my /template application on the server
I copied them all into the /bin directory - at this stage I was then unable
to add them to the toolbar - it didnt give any errors or anything - but it
wouldnt add them - and when I opened the /template application within the
solution explorer as well as the current application to drag them onto the
page it simply placed them in as hyperlinks!!
I am now completely - COMPLETELY - confused and going off of ASP.Net very
rapidly....(I dont like losing!)...
I'm now left wondering whether the .dll (Web Control Libraries) I created
were only supposed to live locally on the PC - in which case wouldnt I now
need to add them to each of the developers PC's for them to use them? If
so - this again means that if I ever change the template I'll have to let
everyone know and we'll still have to change all of the applications. I
just cant work out where I am going wrong - what I am supposed to be
doing...
I've trawled the net for the last few days this week, and most of last week
and do not seem to be able to find any examples of people doing the same
thing, and especially nothing written for Joe Newbie...
If anyone can offer me any help for this I would be EXTREMELY grateful - I
really am pulling my hair out - and I dont actually have much anyway!
Many thanks for reading my ASP.Net epic - and I hope someone can help
me.....
Best regards
Rob