| 5:49 pm on Oct 23, 2006 (gmt 0)|
I don't have an answer to your SE question, but if you're absolutely worried about it you change the Label to a Literal and have this as your product name (in your code-behind):
ProductName.Text = "<h1 Class=""BBProductTitle"">" & ProductNameVariable & "</h1>"
| 12:36 am on Oct 24, 2006 (gmt 0)|
Like the above poster, i am not 100% sure it matter either, however you *are* using the wrong server control IMHO. A Label inherits from WebControl so that you have all the styling and formatting options that WebControl offers (bleh). Your situation is better served with a Literal control which inherits from Control (lighter weight with none of the fancy (and useless) styling options of WebControl. Moreover, Literal controls do not wrap the Text property in a Span the way a Label does...
| 12:45 am on Oct 24, 2006 (gmt 0)|
Why not just do this?
<h1 Class="BBProductTitle" Runat="Server"></H1>
| 10:11 am on Oct 24, 2006 (gmt 0)|
i'm editting the source code of an existing VB.Net implemented E-Commerce software, in order to customise it, so i'm trying to remove a lot of the 'Shrapnel' that appears, as well as code in some SEO techniques that i feel need to be in there.
I would replace with a literal, but i don't really have the time at this point to try and sift through all the code to find where the text value is pulled from.
| 4:00 pm on Oct 24, 2006 (gmt 0)|
You could put the <H1> and </H1> tag into the text of the label itself.
It would render as
<span id="dnn_ctr431_ProductPage_ProductName"><h1 class="BBProductTitle">Turquoise Tankini<h1>/span>
This would be better for seo IMO
| 11:55 am on Oct 26, 2006 (gmt 0)|
I don't think <span id="dnn_ctr431_ProductPage_ProductName"><h1 class="BBProductTitle">Turquoise Tankini<h1>/span> is valid markup - you shouldn't wrap a block level element (<h1>) in an inline element (<span>).
A literal would be a better idea. You should only have to change the definition in the code.
[edited by: Jimmy_Turnip at 11:56 am (utc) on Oct. 26, 2006]
| 12:21 am on Oct 27, 2006 (gmt 0)|
I still don't understand why you just don't run the H1 tag at the server and ditch the span all together. You can fix this in no time at all.
| 6:19 am on Oct 27, 2006 (gmt 0)|
Second what Easy_Coder said, but regardless, just use this:
<h1 Class="BBProductTitle"><asp:literal id="ProductName" Runat="server"></H1>
| 7:08 pm on Oct 27, 2006 (gmt 0)|
The span is the result of a label control on the front end, so once you adjust the h1 or use the literal (either way)... then just ditch the Label Control.