Hello,
I have some web user controls that use some style sheets for them self.
Now what is the best way?
- Add everything in one css file?
- Or create a css file for each web user control?
If I choose the last option, how can I add the "<link href..." code inside
the head of the page from the web user control?
Thanks! 6 9363
Arjen,
I think you may be confused as to how the web user controls work.
Web user controls don't have their own <head> sections.
Each web user control gets included within the form tags of the page it's
placed on. Therefore all the user controls on a page use that page's style
sheet.
What you might want to do is set up style class names and then assign that
class name to each object in the user control you want that class to apply
to.
Sincerely,
--
S. Justin Gengo, MCP
Web Developer
Free code library at: www.aboutfortunate.com
"Out of chaos comes order."
Nietzche
"Arjen" <bo*****@hotmail.com> wrote in message
news:bh**********@news2.tilbu1.nb.home.nl... Hello,
I have some web user controls that use some style sheets for them self. Now what is the best way? - Add everything in one css file? - Or create a css file for each web user control?
If I choose the last option, how can I add the "<link href..." code inside the head of the page from the web user control?
Thanks!
Of course I know that... but I want to know if it is posible to add some
thing to the head section from out a web user control. (in code behind)
Thanks!
"S. Justin Gengo" <sj*****@aboutfortunate.com> schreef in bericht
news:e0**************@TK2MSFTNGP12.phx.gbl... Arjen,
I think you may be confused as to how the web user controls work.
Web user controls don't have their own <head> sections.
Each web user control gets included within the form tags of the page it's placed on. Therefore all the user controls on a page use that page's style sheet.
What you might want to do is set up style class names and then assign that class name to each object in the user control you want that class to apply to.
Sincerely,
-- S. Justin Gengo, MCP Web Developer
Free code library at: www.aboutfortunate.com
"Out of chaos comes order." Nietzche
"Arjen" <bo*****@hotmail.com> wrote in message news:bh**********@news2.tilbu1.nb.home.nl... Hello,
I have some web user controls that use some style sheets for them self. Now what is the best way? - Add everything in one css file? - Or create a css file for each web user control?
If I choose the last option, how can I add the "<link href..." code
inside the head of the page from the web user control?
Thanks!
Hi S. Justin,
How do I stop VS.NET 2002, 2003 from deleting the runat="server" every
second save?
Thanks
Ananda
"S. Justin Gengo" <sj*****@aboutfortunate.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl... Arjen,
Now I understand what you want.
1) Make the head tag of your page into a server control. Do this by going
to the design view of the page and changing the head tag to look like:
<head id="Head" runat="server">
I think it does that because <head></head> is a native HTML tag. Try putting
what you need in a <span></span> tag within <head></head>
"Ananda Sim" <an*******@optushome.com.au.invalid> wrote in message
news:e6**************@TK2MSFTNGP09.phx.gbl... Hi S. Justin,
How do I stop VS.NET 2002, 2003 from deleting the runat="server" every second save?
Thanks
Ananda
"S. Justin Gengo" <sj*****@aboutfortunate.com> wrote in message news:%2****************@TK2MSFTNGP12.phx.gbl... Arjen,
Now I understand what you want.
1) Make the head tag of your page into a server control. Do this by
going to the design view of the page and changing the head tag to look like:
<head id="Head" runat="server">
Hi Frank,
I'll certainly try that. Or <div> </div>
But seems like a bunch more unexpected html inside <head></head>
I agree with you that <head> is a native HTML tag.
But seems to me that asp.net is quite happy to make any native HTML tag a
serverside tag by using runat="server" and it maps to htmlgeneric object.
And Visual Studio is more than happy to intellisense and help you
autocomplete the runat="server" attribute when you edit the code.
But the IDE validation and save routine strips that out against the
recommendations of the editor and against the recommendations of asp.net
Thanks
Ananda
"Frank Drebin" <no*****@imsickofspam.com> wrote in message
news:3a**********************@newssvr28.news.prodi gy.com... I think it does that because <head></head> is a native HTML tag. Try
putting what you need in a <span></span> tag within <head></head>
"Ananda Sim" <an*******@optushome.com.au.invalid> wrote in message news:e6**************@TK2MSFTNGP09.phx.gbl... Hi S. Justin,
How do I stop VS.NET 2002, 2003 from deleting the runat="server" every second save?
Thanks
Ananda
"S. Justin Gengo" <sj*****@aboutfortunate.com> wrote in message news:%2****************@TK2MSFTNGP12.phx.gbl... Arjen,
Now I understand what you want.
1) Make the head tag of your page into a server control. Do this by going to the design view of the page and changing the head tag to look like:
<head id="Head" runat="server">
Ananda,
This is why I said be careful. I noticed this behaviour and I have no idea
how to stop it from occurring! Quite annoying. I think we can chalk it up to
a bug.
Sincerely,
--
S. Justin Gengo, MCP
Web Developer
Free code library at: www.aboutfortunate.com
"Out of chaos comes order."
Nietzche
"Ananda Sim" <an*******@optushome.com.au.invalid> wrote in message
news:eB****************@TK2MSFTNGP10.phx.gbl... Hi Frank,
I'll certainly try that. Or <div> </div>
But seems like a bunch more unexpected html inside <head></head>
I agree with you that <head> is a native HTML tag.
But seems to me that asp.net is quite happy to make any native HTML tag a serverside tag by using runat="server" and it maps to htmlgeneric object.
And Visual Studio is more than happy to intellisense and help you autocomplete the runat="server" attribute when you edit the code.
But the IDE validation and save routine strips that out against the recommendations of the editor and against the recommendations of asp.net
Thanks Ananda
"Frank Drebin" <no*****@imsickofspam.com> wrote in message news:3a**********************@newssvr28.news.prodi gy.com... I think it does that because <head></head> is a native HTML tag. Try putting what you need in a <span></span> tag within <head></head>
"Ananda Sim" <an*******@optushome.com.au.invalid> wrote in message news:e6**************@TK2MSFTNGP09.phx.gbl... Hi S. Justin,
How do I stop VS.NET 2002, 2003 from deleting the runat="server" every second save?
Thanks
Ananda
"S. Justin Gengo" <sj*****@aboutfortunate.com> wrote in message news:%2****************@TK2MSFTNGP12.phx.gbl... > Arjen, > > Now I understand what you want. > > 1) Make the head tag of your page into a server control. Do this by going to > the design view of the page and changing the head tag to look like: > > <head id="Head" runat="server"> >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Eric Veltman |
last post by:
Hello everyone,
I've posted this question before, but got no answer,
so I'll try to reformulate the question, maybe it helps :-)
By the way, this is not intended as the start of an ASP.NET...
|
by: Ric |
last post by:
im new to asp.net. from what i understand, you have the aspx file
(presentation), user-control(ascx file), code-behind(vb file) and
components(compiled vb and dll files). the aspx file contains a...
|
by: Tim::.. |
last post by:
Can someone please help....
I'm having major issues with a user control I'm tring to create!
I an trying to execute a sub called UploadData() from a user control which I
managed to do but for...
|
by: Tim::.. |
last post by:
Can someone please help....
I'm having major issues with a user control I'm tring to create!
I an trying to execute a sub called UploadData() from a user control which I
managed to do but for...
|
by: Tim::.. |
last post by:
Can someone please help....
I'm having major issues with a user control I'm tring to create!
I an trying to execute a sub called UploadData() from a user control which I
managed to do but for...
|
by: Tim::.. |
last post by:
Can someone please help....
I'm having major issues with a user control I'm tring to create!
I an trying to execute a sub called UploadData() from a user control which I
managed to do but for...
|
by: Alan Silver |
last post by:
Hello,
In classic ASP, I used to use two include files on each page, one before
and one after the main content, to provide a consistent layout across a
web site. That way I could just change the...
|
by: npverni |
last post by:
I have a fairly complex form that needs to load and maintain the state
of several different dynamic user controls. Here is the workflow:
1) A series of editable user controls (each containing...
|
by: tshad |
last post by:
User VS 2003, I would like to use User Controls to control the page look
with 3 User Controls (...PageTop.ascx, ...NavigateTop.ascx and
PageBottom.ascx). I would put the Content User control...
|
by: mark.norgate |
last post by:
I've run into a few problems trying to use generics for user controls
(classes derived from UserControl). I'm using the Web Application model
rather than the Web Site model.
The first problem...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |