473,763 Members | 8,483 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using web.sitemap to hold SEO meta data

here's what i've got so far in my code beind

if (SiteMap.Curren tNode != null) {
if (SiteMap.Curren tNode["metaKeywor ds"] != null)
{
strMetaKeywords = SiteMap.Current Node["metaKeywor ds"];
strMetaDescript ion = SiteMap.Current Node.Descriptio n;
}
else
{
strMetaKeywords = "this is a test";
}
}

if (!Page.IsPostBa ck)
Page.DataBind() ;
}
So, it pulls Description and metaKeyword from the siteMapNode and
populates the webform meta tags. It work well. What i'm not sure how
to do is populate steMetakeywords or strMetaDescript ion with content
if there is no siteMapNode for a given web form (that's what i'm
attempting to do in the ELSE statement).

any ideas?
Feb 21 '08 #1
0 1116

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

Similar topics

1
1349
by: Stephen | last post by:
I have the following for a datagrid that inserts a row into an xml file. It works great, but inserts the data to a new top-level node. I don't know how to specifiy an existing node for the inserted item: void DataGrid1_Update(Object Sender, DataGridCommandEventArgs e) { try { string stitle = (e.Item.Cells.FindControl("txttitle") as TextBox).Text; DataSet ds = new DataSet();
6
1725
by: Alan Silver | last post by:
Hello, I want to show a treeview display of the contents of a sitemap file on another web site, chosen according to the currently logged on user. I know at run time the path to the sitemap file, but this cannot be determined at design time as it depends who logs in. Can I do this? I can't see how without writing my own provider, which seems like a lot of work for such a simple request?
3
2263
by: Ray Booysen | last post by:
Hi all I have a treeview bound to a sitemap. Once the user is logged in, I'm wanting the menu to expand to include additional items from a database while retaining the items in the sitemap. Is this possible. For example. My menu has an item called "Books" defined in the sitemap. Once the user logs in, I want sub menu-items to be created under books with all
7
1415
by: JJ | last post by:
I'm playing aournd with my first asp.net 2.0 web site and looking at the Web.sitemap file. It seems there's a lot of publicity at the moment about Google's sitemaps and how they are supposed to get your site more likely to be indexed. Do we therefore use Googles, the standard web.sitemap file, or both?? If anyone has used the Google version, is there any way of getting it to work with the TreeView and SiteMapPath controls?
1
1787
by: -D- | last post by:
I am trying to use multiple sitemaps within my site as described in the following MSDN article: http://msdn2.microsoft.com/en-us/library/ms178426.aspx I tried adding the following to the web.config file: <?xml version="1.0"?> <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"> <appSettings> <add key="ConnectionString" value="Password=xxxxx;Persist Security
2
1969
by: shapper | last post by:
Hello, I am for days trying to apply a XSL transformation to a XML file and display the result in a the browser. I am using Asp.Net 2.0. Please, could someone post just a simple code example, either C# or VB.NET, that I can try. Thank You Very Much,
3
5745
by: Anders | last post by:
Hello, i have created a custom sitemap datasource. The sitemap gets all pages from a collection from a CMS system (not directly from a database). I have declared my sitemap provider as default in web.config. In the pages I have a sitemap datasource and corresponding menus. Question: - Where is the data cached? - How can I release it from the cache and refresh the data?
1
2020
by: Robert Dufour | last post by:
In Vs2005 VB.net. How do you localize the title and the description of the pages in the web.sitemap file? For instance in the simple sitemap below <?xml version="1.0" encoding="utf-8" ?> <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" > <siteMapNode url="Default.aspx" title="Login" description="Login" >
0
2217
by: Chris | last post by:
Hi, i have a problem with the visibility of my sitemap. There is one role defined: "manager" There are two users: 'user1' (member of role manager) and 'user2' (not member). The login.aspx redirects to a page with a menu control associated to a SiteMapDataSource. I want to hide pg1 for all non-members of role manager (=user2).
0
9564
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
10148
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...
1
9938
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9823
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
8822
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
7368
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...
1
3917
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
3528
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2794
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.