ascx file and <link ...> tag

  • Thread starter Thread starter Gopalan
  • Start date Start date
G

Gopalan

Hi

I was using <link href="...." type="..."> tag inside the .aspx file.

When I converted this aspx file to ascx file and use it in an aspx file it
is not working properly.

Please tell me where to put it.

Thanks

GB
 
Gopalan said:
Hi

I was using <link href="...." type="..."> tag inside the .aspx file.

When I converted this aspx file to ascx file and use it in an aspx
file it is not working properly.

The link elements is a child of a page's head element. Thus, you cannot
use them in a user control unless the control contains a head element.

Cheers,
 
Hi

I was using <link href="...." type="..."> tag inside the .aspx file.

When I converted this aspx file to ascx file and use it in an aspx file
it
is not working properly.

Please tell me where to put it.

Thanks

GB

It goes in the HEAD section of an HTML document. You'll have to either
convert it to an inline stylesheet, or put in the HEAD of each document
you use the ascx in.

One thing you could try to keep the css references to a minimum is putting
an inline stylesheet in the ascx that simply imports the css file; I
believe it would work:

<style>@import url("../mycss.css");</style>

http://w3development.de/css/hide_css_from_browsers/import/
 

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

Back
Top