Avatar of Dovberman
Dovberman
Flag for United States of America asked on

ASP.NET version and menu control support

My menu works properly on my local machine, but not on the host server.
How do I find out which version of asp.net is being used on my local machine?

How can I set web.config statements that specify a asp.net version?

I realize that this may require a different web.config file to be published to the server.

Thanks,
ASP.NET.NET ProgrammingMicrosoft Development

Avatar of undefined
Last Comment
Dovberman

8/22/2022 - Mon
Jesus Rodriguez

What happened on the server side with the menu??
It's a 3rd party control??

On the Visual Studio you go to WebSite/Start Option /Build and you will see the Framework that you're using

To Set The TArget Framework on the Web.Config
<system.web>
    <compilation debug="false" strict="false" explicit="true" targetFramework="4.0" />
</system.web>

Also double check that the Control, if is a 3rd party control, gets into the Web.Config on the host server and CHeck in both browser(Mozilla Firefox and IE just in Case)
Dovberman

ASKER
What happened on the server side with the menu??
It was installed with Visual Studio 2012.

The menu dynamic items drop down on the local machine but not on the server.

On the Visual Studio you go to WebSite/Start Option /Build and you will see the Framework that you're using.

It is .NET Framework 4.5

To Set The TArget Framework on the Web.Config
<system.web>
    <compilation debug="false" strict="false" explicit="true" targetFramework="4.0" />
</system.web>

web.Config:

I just changed 4.0 to 4.5.

Should I change the following from  Version=3.5.0.0, to 4.5?

 <compilation debug="true" targetFramework="4.5" >
      <assemblies>
        <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Web.DynamicData, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add assembly="System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add assembly="System.Web.Abstractions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add assembly="System.ComponentModel.DataAnnotations, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add assembly="System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Data.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <!--
        <add assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0,Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral,PublicKeyToken=B03F5F7F11D50A3A"/>
       
        notes
        -->
      </assemblies>

    </compilation>

    <httpRuntime targetFramework="4.5" />

The server is running 4.5.50709.

Should I change 4.5 to 4.5.50709 in my web.config?

Thanks,
Jesus Rodriguez

You don't need to change on your web.config the Add Assembly references if is not a control that use only 3.5 Framework and not supported on 4.5, when you compiled the project and published, it will do all for you. ALso check the compatibility view on your IE.

Did you try with both browsers as I tell you before??
Your help has saved me hundreds of hours of internet surfing.
fblack61
Dovberman

ASKER
Thanks for your suggestions.

I did not try yet with other browsers.

This is how I fixed it:

                <asp:Menu ID="Menu1" runat="server"
                    Orientation="Horizontal"
                    CssClass="Menu" StaticHorizontalOffset="1"
                    DynamicHorizontalOffset="8"
                    StaticHoverStyle-CssClass="auto-style1"
                    StaticSelectedStyle-CssClass="auto-style1"
                    IncludeStyleBlock="False"
                    DynamicHoverStyle-Width="160px"
                    Width="100px"
                    RenderingMode="Default"
                    DisappearAfter="100"
                    DynamicMenuItemStyle-ItemSpacing="2px"
                    DynamicMenuStyle-BackColor="Yellow"
                    DynamicMenuItemStyle-BackColor="Yellow"
                    DynamicMenuItemStyle-VerticalPadding="1px"
                    DynamicMenuStyle-BorderStyle="Solid"
                    DynamicMenuStyle-HorizontalPadding="1px"
                    DynamicMenuStyle-VerticalPadding="1px"
                    DynamicSelectedStyle-BackColor="Lime"
                    DynamicVerticalOffset="2"
                    DynamicHoverStyle-BackColor="#00CCFF"  
                    MaximumDynamicDisplayLevels="3" Height="48px">
                   
                       <Items>
                            <asp:MenuItem NavigateUrl="#" Text="Basics" Value="mnuBasics">
                                <asp:MenuItem
                                    NavigateUrl="Default.aspx" Text="Home" Value="mnuHome" >
                                </asp:MenuItem>
                   
                                <asp:MenuItem
                                    NavigateUrl="ContactUs.aspx" Text="Contact Us" Value="mnuContactUs">
                                </asp:MenuItem>

                            </asp:MenuItem>
                   
                            <asp:MenuItem NavigateUrl="#" Text="Features" Value="mnuFeatures">
                                <asp:MenuItem
                                    NavigateUrl="BestPicks.aspx" Text="Best Picks(Registered Users)" Value="mnuBestPicks">
                                </asp:MenuItem>
                   
                                <asp:MenuItem
                                    NavigateUrl="FinanceTermsDefn.aspx" Text="Finance Terms" Value="mnuFinanceTerms">
                                </asp:MenuItem>
 
                            </asp:MenuItem>
               
                           <asp:MenuItem NavigateUrl="#" Text="Registration" Value="mnuRegistration">
                   
                                <asp:MenuItem
                                    NavigateUrl="RenewSubscription.aspx" Text="Renew Subscription" Value="mnuRenew">
                                </asp:MenuItem>

                                <asp:MenuItem
                                    NavigateUrl="RegisterFree.aspx" Text="Free Trial" Value="mnuFreeTrial">
                                </asp:MenuItem>
                   
                                <asp:MenuItem
                                    NavigateUrl="ReplacePassword.aspx" Text="Replace Password" Value="mnuReplacePassword">
                                </asp:MenuItem>

                                <asp:MenuItem
                                    NavigateUrl="ChangePassword.aspx" Text="Change Password" Value="mnuChangePassword">
                                </asp:MenuItem>
                            </asp:MenuItem>
               
                            <asp:MenuItem NavigateUrl="#" Text="Site Usage Help" Value="mnuSiteHelp">
                                <asp:MenuItem
                                    NavigateUrl="ChangePasswordInstructions.aspx" Text="Password Change Help" Value="mnuChangePasswordHelp">
                                </asp:MenuItem>
                            </asp:MenuItem>

                    <asp:MenuItem NavigateUrl="#" Text="Admin Only" Value="mnuAdminOnly">
                        <asp:MenuItem
                        NavigateUrl="Admin/AdminMenu.aspx" Text="Admin Menu" Value="mnuAdminMenu">
                        </asp:MenuItem>
              </asp:MenuItem>
             
             </Items>
         </asp:Menu>

These were the most important changes:

IncludeStyleBlock="False"
RenderingMode="Default"
Dovberman

ASKER
Here is the result.  I could not set the colors. However after 5 days of work, this is acceptable.
MenuFixed.jpg
ASKER CERTIFIED SOLUTION
Jesus Rodriguez

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Dovberman

ASKER
I am using IE 10 on Windows 8. The menu works well on my machine, but not on the host server.

The links you provided are excellent.  I will save them for future reference.

Thanks,
âš¡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Dovberman

ASKER
Thank you.