By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,919 Members | 1,587 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,919 IT Pros & Developers. It's quick & easy.

Menu Control with Multiview Control ???

P: n/a
Good morning friends,

I am working with ASP.NET 2.0 -- VB code behind

I have created tabbed pages using the Menu control with the Multiview
control. Using the menu control to display the tabs, and the Multiview
control to display the content that corresponds to the selected tab.

My Menu control needs to be able to switch language from English or French
depending on the language chosen by the user.

At the moment I have hard coded the Text: area to the English language.

I tried to dump asp code to pick either ENG language or FRE depending on the
page lang="en" or page lang="fr"
<%

If Request.QueryString("lang") = "en" Then

%>

However I receive an ::::::::::::::::::: Error: ASP.NET
Runtime..........Code blocks are not supported in this context.

My question is,

Is there a way to access the Text portion of the Menu control to switch
languages from English to French on the Source side of the code OR should I
try and access it through the vb.aspx code side of things? And how may I
chnage it back and forth.

Please see below....................
My Menu control CODE:
<asp:Menu

id="menuTabs"

CssClass="menuTabs"

StaticMenuItemStyle-CssClass="tab"

StaticSelectedStyle-CssClass="selectedTab"

Orientation="Horizontal"

OnMenuItemClick="menuTabs_MenuItemClick"

Runat="server" Width="370px" BackColor="Transparent"
DynamicHorizontalOffset="2" Font-Names="Arial" Font-Size="0.8em"
ForeColor="Transparent" StaticSubMenuIndent="10px" Font-Bold="True"
Height="20px" BorderColor="Transparent">

<Items>

<asp:MenuItem

Text="ENGLISH FIRST SECTION" <<<<< --- Need to have this change to
>>>>Text="Francais Premier Section"
Value="0"

Selected="True" />

<asp:MenuItem

Text="ENGLISH SECOND SECTION" <<<<< --- Need to have this change to
>>>>Text="Francais Deuxieme Section"
Value="1"/>

<asp:MenuItem

Text="ENGLISH THIRD SECTION"<<<<< --- Need to have this change to
>>>>Text="Francais Troisieme Section"
Value="2" />

</Items>

<StaticMenuItemStyle CssClass="tab" HorizontalPadding="5px"
VerticalPadding="2px" />

<StaticSelectedStyle CssClass="selectedTab" BackColor="White" />

<DynamicHoverStyle BackColor="Transparent" />

<DynamicMenuStyle BackColor="Transparent" BorderColor="Transparent" />

<DynamicSelectedStyle ForeColor="Black" />

<DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />

<StaticHoverStyle BorderStyle="Solid" Font-Bold="True" />

</asp:Menu>

Any ideas would be greatly appreciated,

Thanks in advance,

~Brad
------------------------------
Brad Isaacs
..NET Web Developer
www.webdevcreations.com
bi*****@rogers.com
Feb 8 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
What you want to learn is called localization.

--
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=-...8&z=17&l=0&m=h
"Brad Isaacs" <bi*****@rogers.comwrote in message
news:ey***************@TK2MSFTNGP04.phx.gbl...
Good morning friends,

I am working with ASP.NET 2.0 -- VB code behind

I have created tabbed pages using the Menu control with the Multiview
control. Using the menu control to display the tabs, and the Multiview
control to display the content that corresponds to the selected tab.

My Menu control needs to be able to switch language from English or French
depending on the language chosen by the user.

At the moment I have hard coded the Text: area to the English language.

I tried to dump asp code to pick either ENG language or FRE depending on
the page lang="en" or page lang="fr"
<%

If Request.QueryString("lang") = "en" Then

%>

However I receive an ::::::::::::::::::: Error: ASP.NET
Runtime..........Code blocks are not supported in this context.

My question is,

Is there a way to access the Text portion of the Menu control to switch
languages from English to French on the Source side of the code OR should
I try and access it through the vb.aspx code side of things? And how may
I chnage it back and forth.

Please see below....................
My Menu control CODE:
<asp:Menu

id="menuTabs"

CssClass="menuTabs"

StaticMenuItemStyle-CssClass="tab"

StaticSelectedStyle-CssClass="selectedTab"

Orientation="Horizontal"

OnMenuItemClick="menuTabs_MenuItemClick"

Runat="server" Width="370px" BackColor="Transparent"
DynamicHorizontalOffset="2" Font-Names="Arial" Font-Size="0.8em"
ForeColor="Transparent" StaticSubMenuIndent="10px" Font-Bold="True"
Height="20px" BorderColor="Transparent">

<Items>

<asp:MenuItem

Text="ENGLISH FIRST SECTION" <<<<< --- Need to have this change to
>>>Text="Francais Premier Section"

Value="0"

Selected="True" />

<asp:MenuItem

Text="ENGLISH SECOND SECTION" <<<<< --- Need to have this change to
>>>Text="Francais Deuxieme Section"

Value="1"/>

<asp:MenuItem

Text="ENGLISH THIRD SECTION"<<<<< --- Need to have this change to
>>>Text="Francais Troisieme Section"

Value="2" />

</Items>

<StaticMenuItemStyle CssClass="tab" HorizontalPadding="5px"
VerticalPadding="2px" />

<StaticSelectedStyle CssClass="selectedTab" BackColor="White" />

<DynamicHoverStyle BackColor="Transparent" />

<DynamicMenuStyle BackColor="Transparent" BorderColor="Transparent" />

<DynamicSelectedStyle ForeColor="Black" />

<DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />

<StaticHoverStyle BorderStyle="Solid" Font-Bold="True" />

</asp:Menu>

Any ideas would be greatly appreciated,

Thanks in advance,

~Brad
------------------------------
Brad Isaacs
.NET Web Developer
www.webdevcreations.com
bi*****@rogers.com


Feb 8 '07 #2

P: n/a

Can you elaborate?

Localization........my web site uses localization, only the Menu control
does not hold TEXT inside its Expressions in order to use my localization.

Do you have an example, can you reference me to a tutorial......or any ....?
"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.comwro te in message
news:ec**************@TK2MSFTNGP03.phx.gbl...
What you want to learn is called localization.

--
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=-...8&z=17&l=0&m=h
"Brad Isaacs" <bi*****@rogers.comwrote in message
news:ey***************@TK2MSFTNGP04.phx.gbl...
>Good morning friends,

I am working with ASP.NET 2.0 -- VB code behind

I have created tabbed pages using the Menu control with the Multiview
control. Using the menu control to display the tabs, and the Multiview
control to display the content that corresponds to the selected tab.

My Menu control needs to be able to switch language from English or
French depending on the language chosen by the user.

At the moment I have hard coded the Text: area to the English language.

I tried to dump asp code to pick either ENG language or FRE depending on
the page lang="en" or page lang="fr"
<%

If Request.QueryString("lang") = "en" Then

%>

However I receive an ::::::::::::::::::: Error: ASP.NET
Runtime..........Code blocks are not supported in this context.

My question is,

Is there a way to access the Text portion of the Menu control to switch
languages from English to French on the Source side of the code OR should
I try and access it through the vb.aspx code side of things? And how may
I chnage it back and forth.

Please see below....................
My Menu control CODE:
<asp:Menu

id="menuTabs"

CssClass="menuTabs"

StaticMenuItemStyle-CssClass="tab"

StaticSelectedStyle-CssClass="selectedTab"

Orientation="Horizontal"

OnMenuItemClick="menuTabs_MenuItemClick"

Runat="server" Width="370px" BackColor="Transparent"
DynamicHorizontalOffset="2" Font-Names="Arial" Font-Size="0.8em"
ForeColor="Transparent" StaticSubMenuIndent="10px" Font-Bold="True"
Height="20px" BorderColor="Transparent">

<Items>

<asp:MenuItem

Text="ENGLISH FIRST SECTION" <<<<< --- Need to have this change to
>>>>Text="Francais Premier Section"

Value="0"

Selected="True" />

<asp:MenuItem

Text="ENGLISH SECOND SECTION" <<<<< --- Need to have this change to
>>>>Text="Francais Deuxieme Section"

Value="1"/>

<asp:MenuItem

Text="ENGLISH THIRD SECTION"<<<<< --- Need to have this change to
>>>>Text="Francais Troisieme Section"

Value="2" />

</Items>

<StaticMenuItemStyle CssClass="tab" HorizontalPadding="5px"
VerticalPadding="2px" />

<StaticSelectedStyle CssClass="selectedTab" BackColor="White" />

<DynamicHoverStyle BackColor="Transparent" />

<DynamicMenuStyle BackColor="Transparent" BorderColor="Transparent" />

<DynamicSelectedStyle ForeColor="Black" />

<DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />

<StaticHoverStyle BorderStyle="Solid" Font-Bold="True" />

</asp:Menu>

Any ideas would be greatly appreciated,

Thanks in advance,

~Brad
------------------------------
Brad Isaacs
.NET Web Developer
www.webdevcreations.com
bi*****@rogers.com



Feb 8 '07 #3

P: n/a
// the following search term is all I can suggest...
localizing the asp.net menu control site:msdn2.microsoft.com

<%= Clinton

"Brad Isaacs" <bi*****@rogers.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>
Can you elaborate?

Localization........my web site uses localization, only the Menu control
does not hold TEXT inside its Expressions in order to use my
localization.

Do you have an example, can you reference me to a tutorial......or any
....?
"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.comwro te in message
news:ec**************@TK2MSFTNGP03.phx.gbl...
>What you want to learn is called localization.

--
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=-...8&z=17&l=0&m=h
"Brad Isaacs" <bi*****@rogers.comwrote in message
news:ey***************@TK2MSFTNGP04.phx.gbl...
>>Good morning friends,

I am working with ASP.NET 2.0 -- VB code behind

I have created tabbed pages using the Menu control with the Multiview
control. Using the menu control to display the tabs, and the Multiview
control to display the content that corresponds to the selected tab.

My Menu control needs to be able to switch language from English or
French depending on the language chosen by the user.

At the moment I have hard coded the Text: area to the English language.

I tried to dump asp code to pick either ENG language or FRE depending on
the page lang="en" or page lang="fr"
<%

If Request.QueryString("lang") = "en" Then

%>

However I receive an ::::::::::::::::::: Error: ASP.NET
Runtime..........Code blocks are not supported in this context.

My question is,

Is there a way to access the Text portion of the Menu control to switch
languages from English to French on the Source side of the code OR
should I try and access it through the vb.aspx code side of things? And
how may I chnage it back and forth.

Please see below....................
My Menu control CODE:
<asp:Menu

id="menuTabs"

CssClass="menuTabs"

StaticMenuItemStyle-CssClass="tab"

StaticSelectedStyle-CssClass="selectedTab"

Orientation="Horizontal"

OnMenuItemClick="menuTabs_MenuItemClick"

Runat="server" Width="370px" BackColor="Transparent"
DynamicHorizontalOffset="2" Font-Names="Arial" Font-Size="0.8em"
ForeColor="Transparent" StaticSubMenuIndent="10px" Font-Bold="True"
Height="20px" BorderColor="Transparent">

<Items>

<asp:MenuItem

Text="ENGLISH FIRST SECTION" <<<<< --- Need to have this change to
>Text="Francais Premier Section"

Value="0"

Selected="True" />

<asp:MenuItem

Text="ENGLISH SECOND SECTION" <<<<< --- Need to have this change to
>Text="Francais Deuxieme Section"

Value="1"/>

<asp:MenuItem

Text="ENGLISH THIRD SECTION"<<<<< --- Need to have this change to
>Text="Francais Troisieme Section"

Value="2" />

</Items>

<StaticMenuItemStyle CssClass="tab" HorizontalPadding="5px"
VerticalPadding="2px" />

<StaticSelectedStyle CssClass="selectedTab" BackColor="White" />

<DynamicHoverStyle BackColor="Transparent" />

<DynamicMenuStyle BackColor="Transparent" BorderColor="Transparent" />

<DynamicSelectedStyle ForeColor="Black" />

<DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />

<StaticHoverStyle BorderStyle="Solid" Font-Bold="True" />

</asp:Menu>

Any ideas would be greatly appreciated,

Thanks in advance,

~Brad
------------------------------
Brad Isaacs
.NET Web Developer
www.webdevcreations.com
bi*****@rogers.com




Feb 9 '07 #4

P: n/a
Hi Clinton,

Thanks for your help.

~Brad

ps: Kool Google map of where you are........& web site~

"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.comwro te in message
news:%2*****************@TK2MSFTNGP02.phx.gbl...
// the following search term is all I can suggest...
localizing the asp.net menu control site:msdn2.microsoft.com

<%= Clinton

"Brad Isaacs" <bi*****@rogers.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>>
Can you elaborate?

Localization........my web site uses localization, only the Menu control
does not hold TEXT inside its Expressions in order to use my
localization.

Do you have an example, can you reference me to a tutorial......or any
....?
"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.comwro te in
message news:ec**************@TK2MSFTNGP03.phx.gbl...
>>What you want to learn is called localization.

--
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=-...8&z=17&l=0&m=h
"Brad Isaacs" <bi*****@rogers.comwrote in message
news:ey***************@TK2MSFTNGP04.phx.gbl...
Good morning friends,

I am working with ASP.NET 2.0 -- VB code behind

I have created tabbed pages using the Menu control with the Multiview
control. Using the menu control to display the tabs, and the Multiview
control to display the content that corresponds to the selected tab.

My Menu control needs to be able to switch language from English or
French depending on the language chosen by the user.

At the moment I have hard coded the Text: area to the English language.

I tried to dump asp code to pick either ENG language or FRE depending
on the page lang="en" or page lang="fr"
<%

If Request.QueryString("lang") = "en" Then

%>

However I receive an ::::::::::::::::::: Error: ASP.NET
Runtime..........Code blocks are not supported in this context.

My question is,

Is there a way to access the Text portion of the Menu control to switch
languages from English to French on the Source side of the code OR
should I try and access it through the vb.aspx code side of things?
And how may I chnage it back and forth.

Please see below....................
My Menu control CODE:
<asp:Menu

id="menuTabs"

CssClass="menuTabs"

StaticMenuItemStyle-CssClass="tab"

StaticSelectedStyle-CssClass="selectedTab"

Orientation="Horizontal"

OnMenuItemClick="menuTabs_MenuItemClick"

Runat="server" Width="370px" BackColor="Transparent"
DynamicHorizontalOffset="2" Font-Names="Arial" Font-Size="0.8em"
ForeColor="Transparent" StaticSubMenuIndent="10px" Font-Bold="True"
Height="20px" BorderColor="Transparent">

<Items>

<asp:MenuItem

Text="ENGLISH FIRST SECTION" <<<<< --- Need to have this change to
>>Text="Francais Premier Section"

Value="0"

Selected="True" />

<asp:MenuItem

Text="ENGLISH SECOND SECTION" <<<<< --- Need to have this change to
>>Text="Francais Deuxieme Section"

Value="1"/>

<asp:MenuItem

Text="ENGLISH THIRD SECTION"<<<<< --- Need to have this change to
>>Text="Francais Troisieme Section"

Value="2" />

</Items>

<StaticMenuItemStyle CssClass="tab" HorizontalPadding="5px"
VerticalPadding="2px" />

<StaticSelectedStyle CssClass="selectedTab" BackColor="White" />

<DynamicHoverStyle BackColor="Transparent" />

<DynamicMenuStyle BackColor="Transparent" BorderColor="Transparent" />

<DynamicSelectedStyle ForeColor="Black" />

<DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />

<StaticHoverStyle BorderStyle="Solid" Font-Bold="True" />

</asp:Menu>

Any ideas would be greatly appreciated,

Thanks in advance,

~Brad
------------------------------
Brad Isaacs
.NET Web Developer
www.webdevcreations.com
bi*****@rogers.com




Feb 9 '07 #5

P: n/a
Hi Clinton,

When I first tried to insert the Resource file tags into my menu control
code blocks, I had made a typo unknowingly....hence the error.

As I thought, it was a simple fix..................

<asp:MenuItem

Text="<%$ Resources:Resources, FirstTab %>"

Value="0"

Selected="True" />

<asp:MenuItem

Text="<%$ Resources:Resources, SecondTab %>"

Value="1"/>

<asp:MenuItem

Text="<%$ Resources:Resources, ThirdTab %>"

Value="2" />

</Items>
Thanks again,

~Brad

"Brad Isaacs" <bi*****@rogers.comwrote in message
news:uM**************@TK2MSFTNGP05.phx.gbl...
Hi Clinton,

Thanks for your help.

~Brad

ps: Kool Google map of where you are........& web site~

"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.comwro te in message
news:%2*****************@TK2MSFTNGP02.phx.gbl...
>// the following search term is all I can suggest...
localizing the asp.net menu control site:msdn2.microsoft.com

<%= Clinton

"Brad Isaacs" <bi*****@rogers.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>>>
Can you elaborate?

Localization........my web site uses localization, only the Menu control
does not hold TEXT inside its Expressions in order to use my
localization.

Do you have an example, can you reference me to a tutorial......or any
....?
"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.comwro te in
message news:ec**************@TK2MSFTNGP03.phx.gbl...
What you want to learn is called localization.

--
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=-...8&z=17&l=0&m=h
"Brad Isaacs" <bi*****@rogers.comwrote in message
news:ey***************@TK2MSFTNGP04.phx.gbl.. .
Good morning friends,
>
I am working with ASP.NET 2.0 -- VB code behind
>
I have created tabbed pages using the Menu control with the Multiview
control. Using the menu control to display the tabs, and the
Multiview control to display the content that corresponds to the
selected tab.
>
My Menu control needs to be able to switch language from English or
French depending on the language chosen by the user.
>
At the moment I have hard coded the Text: area to the English
language.
>
I tried to dump asp code to pick either ENG language or FRE depending
on the page lang="en" or page lang="fr"
<%
>
If Request.QueryString("lang") = "en" Then
>
%>
>
However I receive an ::::::::::::::::::: Error: ASP.NET
Runtime..........Code blocks are not supported in this context.
>
My question is,
>
Is there a way to access the Text portion of the Menu control to
switch languages from English to French on the Source side of the code
OR should I try and access it through the vb.aspx code side of things?
And how may I chnage it back and forth.
>
Please see below....................
>
>
My Menu control CODE:
<asp:Menu
>
id="menuTabs"
>
CssClass="menuTabs"
>
StaticMenuItemStyle-CssClass="tab"
>
StaticSelectedStyle-CssClass="selectedTab"
>
Orientation="Horizontal"
>
OnMenuItemClick="menuTabs_MenuItemClick"
>
Runat="server" Width="370px" BackColor="Transparent"
DynamicHorizontalOffset="2" Font-Names="Arial" Font-Size="0.8em"
ForeColor="Transparent" StaticSubMenuIndent="10px" Font-Bold="True"
Height="20px" BorderColor="Transparent">
>
<Items>
>
<asp:MenuItem
>
Text="ENGLISH FIRST SECTION" <<<<< --- Need to have this change to
>>>Text="Francais Premier Section"
>
Value="0"
>
Selected="True" />
>
<asp:MenuItem
>
Text="ENGLISH SECOND SECTION" <<<<< --- Need to have this change to
>>>Text="Francais Deuxieme Section"
>
Value="1"/>
>
<asp:MenuItem
>
Text="ENGLISH THIRD SECTION"<<<<< --- Need to have this change to
>>>Text="Francais Troisieme Section"
>
Value="2" />
>
</Items>
>
<StaticMenuItemStyle CssClass="tab" HorizontalPadding="5px"
VerticalPadding="2px" />
>
<StaticSelectedStyle CssClass="selectedTab" BackColor="White" />
>
<DynamicHoverStyle BackColor="Transparent" />
>
<DynamicMenuStyle BackColor="Transparent" BorderColor="Transparent" />
>
<DynamicSelectedStyle ForeColor="Black" />
>
<DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
>
<StaticHoverStyle BorderStyle="Solid" Font-Bold="True" />
>
</asp:Menu>
>
Any ideas would be greatly appreciated,
>
Thanks in advance,
>
~Brad
>
>
------------------------------
Brad Isaacs
.NET Web Developer
www.webdevcreations.com
bi*****@rogers.com
>
>




Feb 9 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.