B
Brad Isaacs
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
Value="0"
Selected="True" />
<asp:MenuItem
Text="ENGLISH SECOND SECTION" <<<<< --- Need to have this change to
Value="1"/>
<asp:MenuItem
Text="ENGLISH THIRD SECTION"<<<<< --- Need to have this change to
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
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
Value="0"
Selected="True" />
<asp:MenuItem
Text="ENGLISH SECOND SECTION" <<<<< --- Need to have this change to
Value="1"/>
<asp:MenuItem
Text="ENGLISH THIRD SECTION"<<<<< --- Need to have this change to
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