473,545 Members | 2,686 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Meta tag modification

Hi everyone,

My goal is to modify the contents of my meta tag (html refresh). However,
my code adds a new instance of the meta tag at the bottom of the page. Is
there a way to modify it instead of adding a new one?

<head>
<title>WebForm1 </title>
<meta name="GENERATOR " Content="Micros oft Visual Studio .NET 7.1">
<meta name="CODE_LANG UAGE" Content="C#">
<meta name=vs_default ClientScript content="JavaSc ript">
<meta name=vs_targetS chema
content="http://schemas.microso ft.com/intellisense/ie5">
<meta id="MyRefresh" http-equiv="refresh" runat="server" />
</head>

Code:
private HtmlGenericCont rol baseDescription ;

private void Page_Load(objec t sender, System.EventArg s e)
{
// Put user code to initialize the page here
baseDescription = new HtmlGenericCont rol("meta");
baseDescription .ID = "MyRefresh" ;
baseDescription .Attributes["http-equiv"] = "refresh";
baseDescription .Attributes["content"] = "10;url=htt p://www.google.com/";
this.Controls.A dd(baseDescript ion);
}

It produces this
<html>
<head>
<title>WebForm1 </title>
<meta name="GENERATOR " Content="Micros oft Visual Studio .NET 7.1">
<meta name="CODE_LANG UAGE" Content="C#">
<meta name=vs_default ClientScript content="JavaSc ript">
<meta name=vs_targetS chema
content="http://schemas.microso ft.com/intellisense/ie5">
<meta id="MyRefresh" http-equiv="refresh" ></meta>
</head>
<body MS_POSITIONING= "GridLayout ">
<form name="Form1" method="post" action="WebForm 1.aspx" id="Form1">
<input type="hidden" name="__VIEWSTA TE"
value="dDwyMDQ4 ODY2NTc4Ozs+TOE vvBKAHbIZ9zIwcQ pj+TlnFX8=" />
</form>
</body>
</html>
<meta id="MyRefresh" http-equiv="refresh"
content="10;url =http://www.google.com/"></meta>Thank you
Maz.
Nov 18 '05 #1
1 1950
"Maziar Aflatoun" <ma***@rogers.c om> wrote in news:G5LRc.1605 $Bpa1.1223
@news04.bloor.i s.net.cable.rog ers.com:
Is
there a way to modify it instead of adding a new one?


You can place a label or place holder in the meta tag, then output data to
the placeholder or label.

--
Lucas Tam (RE********@rog ers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 18 '05 #2

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

Similar topics

2
1395
by: Carlo v. Dango | last post by:
hello there I'd like to take control over the method dispatching of every subclass of a given python class. Currently I've redefined __getattribute__() so i can find the right instance/method to dispatch to. This works fine, albeit it may seem a bit hackish. Further I want to control the actual dispatching, so that I can execute methods...
3
1559
by: daishi | last post by:
Hi, I am wondering if someone could help me understand some of the details of using metaclasses. I am trying to use metaclasses to auto-generate some attributes and methods in a class definition. I am attaching a simplified example of the kind of code I am considering below, and I have the following questions:
27
1994
by: Jon Slaughter | last post by:
is there any way to create c++ code using some type of objected oriented framework that is designed to be used to create C++ applications? something like maybe new class1; class1.add_class("first_class", "base_class"); class1.add_private_data("char *", "name"); class1.add_public_member("void", "Name", "const char *n", "{ name = n; }");
0
1018
by: Maziar Aflatoun | last post by:
Hi, I like to add content="10;url=http://www.google.com/" to my refresh tag. The following still doesn't work. Can someone please tell me what I'm doing wrong? (Note: It's not a new meta tag but an already existing one) I have the following code <HEAD> <meta id="MyRefresh" http-equiv="refresh" runat="server"/> </HEAD>
1
1791
by: Maziar Aflatoun | last post by:
Hi everyone, I have the following HTML code and I like to change the value of REFRESH content from 2 to something else at runtime. Any suggestions? <HTML> <HEAD> <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1"> <meta name="CODE_LANGUAGE" Content="C#">
4
1133
by: Maziar Aflatoun | last post by:
Hi, I like to add content="10;url=http://www.google.com/" to my refresh tag. The following still doesn't work. Can someone tell me please what I'm doing wrong? (Note: It's not a new meta tag but an already existing one) I have the following code <HEAD> <meta id="MyRefresh" http-equiv="refresh" runat="server"/> </HEAD>
19
13075
by: IveCal | last post by:
Hello, I have this code which redirects to http://www.domain.com/link.html . . . but I want to specify the NUMBER OF SECONDS before the site is redirected. Can somebody here help me . . .. <meta http-equiv="Refresh" content="4;url=http://www.domain.com/link.html"> PLEASE HELP. Thanks.
13
1797
by: ts-dev | last post by:
Is it possible to prevent modification of a python file once its been deployed? File permissions of the OS could be used..but that doesn't seem very secure. The root of my question is verifying the integrity of the application and the scripts being run. Is this possible, if so, how?
2
1913
by: Unpopular | last post by:
void directory::modification()//??????????? { clrscr(); cout<< "\n\t @@@@@@ @@@@@ @@@@@ @@@@@@ @@@@@ @ @ @@@@@@ "; cout<< "\n\t=====@ @ @ @ @ @ @@ @ @ ====="; cout<< "\n\t=====@@@@@@ @ @ @ @ @ @ @ @ @ @@@ =====";
0
7496
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
1
7452
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7784
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6014
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5354
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5071
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3485
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1916
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1039
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.