Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
|
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 28th, 2007, 09:23 AM
Authorized User
 
Join Date: Dec 2006
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default Website title (English and French)

I have MasterPage.master and I want to set the title using resources files so I can have an english title as well as a french title depending on the context.

Code:
<head runat="server">
    <title>My title</title>
</head>
We can't put an asp control in the head, this doesn't work:

Code:
<head runat="server">
    <title><asp:Literal Text='<%$ Resources:Title %>' /></title>
</head>
Why is that? Is there another solution we missed?

Thank you!

 
Old March 28th, 2007, 09:29 AM
Authorized User
 
Join Date: Dec 2006
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This work! :)

Code:
<head runat="server">
    <title id="titleId" runat="server"></title>
</head>
And in the code behind, set titleId.Text to (String)this.GetLocalResourceObject("Title");

 
Old March 29th, 2007, 01:19 AM
Authorized User
 
Join Date: Feb 2007
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

you should try this

<%@ Page Language="VB" MasterPageFile="~/KKKK.master" AutoEventWireup="false" CodeFile="Glossary.aspx.vb" Inherits="Glossary" title="<%$ Resources:localize, v_Welcome_Caption%>"%>

where variable v_Welcome_Caption should be the English and French localize resources files







Similar Threads
Thread Thread Starter Forum Replies Last Post
English to French prabhakaran SQL Server 2000 3 December 5th, 2006 03:49 PM
French Accents Bob Bedell C# 1 February 16th, 2006 12:23 AM
french date format djenandji XSLT 1 January 23rd, 2006 01:41 PM
How to Convert English website and DB in Arabic musharaf Pro PHP 3 March 24th, 2004 01:25 AM
How to Convert English website and DB in Arabic musharaf PHP Databases 1 March 23rd, 2004 09:59 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.