Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing browser window's title via C#? or jscript?
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00870819
Message ID:
00871349
Views:
11
Thank you Cathi

Regards,
Neil

>Hi Neil,
>
>To get
<META>
tags to show up in your HTML, you can use an embedded variable or function call:
>
>Embedded Variable
>
>// In the .aspx file:
><HTML>
><HEAD>
>  <%= myMetaTagsVar  
></HEAD>
>...
>
>// In the code-behind file:
>// create the following field
>public string myMetaTagsVar = @"<META NAME=""Title"" content=""MyTitle"">";
>
>
>Function Call
>
>// In the .aspx file:
><HTML>
><HEAD>
>  <%= GetMetaTagsFunction()  
></HEAD>
>...
>
>// In the code-behind file:
>public string GetMetaTagsFunction()
>{
>   return @"<META NAME=""Title"" CONTENT=""MyTitle"">";
>}
>
>
>
>
>>Hi,
>>
>>I need to set the browser window's title just prior to the page being rendered or very soon afterwards. Is there a way to modify the contents of the TITLE tag pair dynamically. In classic asp I do something like this:
>>
>>
>><title><%=myNewTitle  </title>
>>
>>
>>But asp.net won't allow this sort of thing.
>>
>>Thanx,
>>Neil
Previous
Reply
Map
View

Click here to load this message in the networking platform