473,666 Members | 2,333 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to change an HTMLMeta control or Remove and Add New?

Hello,

I am adding a MetaTag from my .pasx.vb code:
Dim metaTag As New HtmlMeta()
metaTag.Name = "Title"
metaTag.Content = "My Web Site"
Page.Header.Con trols.Add(metaT ag)

Later in my code I might need to change the Content of this MetaTag.
How can I do this?
If it is not possible, how can I remove it and add it a new one?

I have been trying to do this but had no success.

Thank You,
Miguel

Jan 20 '06 #1
1 2141
DWS
I don't remember there being a title meta tag possibly I'm wrong again.

"Title" is a page attribute.
page.title="Web site de los Miguel Dias Moura"
These are the meta tags I use. Notice all but one has name and content
attributes.

<meta NAME="ROBOTS" CONTENT="INDEX, NOFOLLOW"/>
<meta NAME="DESCRIPTI ON" CONTENT="webpar ts in action"/>
<meta NAME="KEYWORDS" CONTENT="webpar t"/>
<meta NAME="AUTHOR" CONTENT="DWS"/>
<meta NAME="publicati on_date" CONTENT="1/26/2005"/>
<meta NAME="distribut ion" CONTENT="global "/>
<meta NAME="language" CONTENT="englis h"/>
<meta NAME="rating" CONTENT="genera l"/>
<meta NAME="copyright " CONTENT="2002, 2005, 2006"/>
<meta HTTP-EQUIV="Reply_to " CONTENT="an**** @anywhere.com"/>

The meta tags are primarily used by search engines.

Good Luck

DWS


"Miguel Dias Moura" wrote:
Hello,

I am adding a MetaTag from my .pasx.vb code:
Dim metaTag As New HtmlMeta()
metaTag.Name = "Title"
metaTag.Content = "My Web Site"
Page.Header.Con trols.Add(metaT ag)

Later in my code I might need to change the Content of this MetaTag.
How can I do this?
If it is not possible, how can I remove it and add it a new one?

I have been trying to do this but had no success.

Thank You,
Miguel

Jan 26 '06 #2

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

Similar topics

4
1693
by: Tee | last post by:
Hi, Does anyone know how to change an index of an object? This is what I want to do. eg: I have 5 controls in a panel. index from 0 to 4, after I remove the 3rd control (index 2), I want to change the control with index 3 to 2, and 4 to 3. (push up) ... so when I add new control to the panel, the new control will have the index 4.
2
20672
by: Mark Kamoski | last post by:
How can one change an image url at runtime? (Note, the image exists in a user control.) This is the image tag on the ascx... <asp:image id="TopBanner" runat="server"></asp:image> ....but I cannot get this to change from the code behind of a page that hosts the user control.
6
5039
by: n33470 | last post by:
Hi all, We have a user control that contains a DropDownList. This user control appears on a web page. Suppose the name of the userControl on the web page is called "ucLookup". Suppose the name of the dropDownList within the user control is called "cboList". On my development PC running VS2005 on WinXP Pro, the rendered HTML for the dropDownList looks like this:
1
1646
by: needin4mation | last post by:
Hi, I have a metatag description like (this is in my masterpage) <meta name="description" id="MyMETADesc".... but this *inline* code fails: (this is in a contentpage based upon the master) <script runat=server>
5
6857
by: mabond | last post by:
Hi Can't believe I've not been able to find the answer to this in the on-line help. I have a CheckedListBox which, via a timer control, is populated with the names of files in a network folder. The "check mark" for each item in the control is determined by the boolean value of a custom property field of the file. That value is found using microsoft's dsofile.dll class.
1
1388
by: Adam | last post by:
I have the following code in my master page: Page.Title = mTitle Dim metaDesc As New HtmlMeta metaDesc.Name = "Description" metaDesc.Content = mDesc Page.Header.Controls.Add(metaDesc)
4
5011
by: sck10 | last post by:
Hello, I have the following in my Master Page that I am using as a redirect template: <head id="headRedirect" runat="server"> <meta id="metaRedirect" http-equiv="Refresh" content="2; URL=http://www.mysite.com/" /> <title>Page Redirect</title> </head>
3
3291
by: Jim in Arizona | last post by:
I have a gridview that's being populated from an access db query. The problem I'm having is that the date/time fields in access that are populating the gridview are showing both date and time, when the field should only be showing one or the other (date or time). Even on the back end of the database where the column properties are, I have chosen the smallest date/time formats. When the aspx page runs, it shows the date and time (ie:in a...
3
4757
by: R.A.F. | last post by:
Hi, I have a custom control in which i have a property based on CollectionBase class. like the following one : //------- XGrid.cs file --------------// public ColumnsCollection Columns {
0
8440
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8352
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8863
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8636
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7378
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6189
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4358
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2765
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
2
2005
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.