473,378 Members | 1,140 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

dynamically adding a <LINK> tag to an asp.net page

brw
Is there a way to dynamically add a link tag to the head block of an
..aspx page? I'm aware that you can add a link tag (or literal
control) statically and then dynamically modify the attributes.

I'm wondering if there's a way to add the tag from scratch at run
time.

thanks,
Ben
Nov 17 '05 #1
2 1793
Response.Write is what you need. Or you can use repeater control, it won't
render anything if it's empty and will allow you to insert more than one
link.

Jerry

"brw" <br********@yahoo.com> wrote in message
news:57**************************@posting.google.c om...
Is there a way to dynamically add a link tag to the head block of an
.aspx page? I'm aware that you can add a link tag (or literal
control) statically and then dynamically modify the attributes.

I'm wondering if there's a way to add the tag from scratch at run
time.

thanks,
Ben

Nov 17 '05 #2
brw
I'm trying to add the link tag within the <head> block of the page.
It's not clear to me how I can use Response.Write for this.
Similarly, I haven't found a way to add a control to the page's <head>
block dynamically from the code-behind page.

thanks,
Ben

"Jerry III" <je******@hotmail.com> wrote in message news:<es**************@TK2MSFTNGP10.phx.gbl>...
Response.Write is what you need. Or you can use repeater control, it won't
render anything if it's empty and will allow you to insert more than one
link.

Jerry

"brw" <br********@yahoo.com> wrote in message
news:57**************************@posting.google.c om...
Is there a way to dynamically add a link tag to the head block of an
.aspx page? I'm aware that you can add a link tag (or literal
control) statically and then dynamically modify the attributes.

I'm wondering if there's a way to add the tag from scratch at run
time.

thanks,
Ben

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Francesco Moi | last post by:
Hello. I'm trying to build a RSS feed for my website. It starts: ----------------//--------------------- <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE rss PUBLIC "-//Netscape...
6
by: Todd Peterson | last post by:
I'm encountering some wierd behavior with a <link> tag over an HTTPS connection, vs. an HTTP connection... In an ASP/HTML page on my website, I've add a <link rel="shortcut icon"...> in order to...
2
by: Alex Maghen | last post by:
I just learned about the wonderful ~ in paths in ASP.NET which allows me to reference the APPLICATION root instead of the IIS docroot. Love it! I'm finding that I can use ~ in many places as long as...
0
by: Joel Leong | last post by:
In <IMG> tag, we can dynamically specifies the src attribute by using a tilde (~) eg. ~/common/img/picture1.jpg How about this: <LINK href="common/css/common.css" type="text/css"...
1
by: Baldoni | last post by:
It's been years since putting together a page. This line in my HTML: <link type="text/css" rel="stylesheet" href="net4801style.css"> gives this problem (via weblint HTML checker): attribute...
17
by: The Numerator | last post by:
I know a lot about HTML, but all this time I don't know what the <LINK> tags in the head do. There are those that call a stylesheet, favicon, etc. But what about those that state the contents of...
4
by: John A Grandy | last post by:
When constructing an RSS 2.0 XML doc , should the <channel><link> element's value be 1. the url of the page the displays the content that the RSS feed describes : fox example:...
9
by: Arancaytar | last post by:
I have so far seen two methods for including external resources as CSS stylesheets in a document. The first is this: <link href="/stylesheets/style.css" rel="stylesheet" type="text/css" /> And...
1
by: Rick | last post by:
Hello, The masterpage of the site has a <divelement that encloses the "content" of the actual aspx page. The content page has a <linkelement. When I try to switch from "source" view to...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.