Link to home
Create AccountLog in
Avatar of piyushdabomb
piyushdabomb

asked on

Setting Superscripts in the Page Title

Hi,

I'm trying to dynamically set the page title in my Page_Load procedure using the following line of code:

Page.Header.Title = "O² Design Center"

This should render to O^2 Design Center (The 2 should be superscripted). I noticed that when the page loads the first time, it successfully shows the 2 being superscripted, but when when the page refreshes, I get  "O² Design Center" without the 2 being superscripted (i.e. You can see the ampersand, hash, 1, 7, 8, and the semicolon)

Any idea why after a page refresh, the 2 doesn't stay superscripted?

Its wierd. Let me know your thoughts. Thanks.
Avatar of JohnPatrickPhilip
JohnPatrickPhilip
Flag of United States of America image


In your HTML code, just use this format, this should take care of it.

O²







O²
 
I am typing the same, if this experts-exchange HTMl rendering makes it into Super Script.
 
O & #178;
 
remove the space in between & and #

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of abel
abel
Flag of Netherlands image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
> In your HTML code, just use this format, this should take care of it.

isn't that the same that the OP just showed? And I saw something about "dynamically" setting the page title.

Just tried it. It shows like the screenshot, even after a page refresh.

ScreenShot162.png
I tried it now with

Page.Header.Title = "O² Design Center"

as well and checked it after refresh... For me at least it shows normal. Regardless a page refresh or a postback. Tested on IE7 and FF3. What versions of VS/IE/FF do you use?
Avatar of piyushdabomb
piyushdabomb

ASKER

Try it with IE6. It doesn't work.

> Try it with IE6. It doesn't work.

with your original code, I reckon... That's an old IE6 problem. Can you try the literal method? Does that work for you?

-- Abel --
Try this

Page.Header.Title = "O" & chr(178) & " Design Center"