Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / August 2007

Tip: Looking for answers? Try searching our database.

Menu Control and IE6

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MikeB - 15 Aug 2007 00:57 GMT
Hello all, I have menu control that works perfect in IE7 however in IE6 it
is very messed up.  Here is the code I am using to populate it, any ideas?

My code:
MikeB - 15 Aug 2007 01:02 GMT
Hello all, I have menu control that works perfect in IE7 however in IE6 it
is very messed up.  Here is the code I am using to populate it, any ideas?

I must have hit send, anywhere here is my code:

              MySite.ProductCategoryService menuservice =
newMySite.ProductCategoryService();
              MySite.Entities.TList<MySite.Entities.ProductCategory>
category;
               category =
menuservice.GetByParentCategoryIDCompanyidStatus(0, Constants.CompanyID,
(int)Constants.Status.Active);
               category.Sort("CategoryDescription ASC");

               category =
menuservice.GetByParentCategoryIDCompanyidStatus(0, Constants.CompanyID,
(int)Constants.Status.Active);

               foreach (MySite.Entities.ProductCategory cat1 in category)
               {
                   MenuItem mnuMain = new MenuItem();
                   mnuMain.Text = cat1.CategoryDescription;
                   mnuMain.Value = cat1.Id.ToString();

                  MySite.Entities.TList<MySite.Entities.ProductCategory>
categorylevel2 = menuservice.GetByParentCategoryIDCompanyidStatus(cat1.Id,
Constants.CompanyID, (int)Constants.Status.Active);
                   categorylevel2.Sort("CategoryDescription ASC");
                   foreach (MySite.Entities.ProductCategory cat2 in
categorylevel2)
                   {
                       MenuItem mnuCat2 = new MenuItem();
                       mnuCat2.Text = cat2.CategoryDescription;
                       mnuCat2.Value = cat2.Id.ToString();

                      MySite.Entities.TList<MySite.Entities.ProductCategory>
categorylevel3 = menuservice.GetByParentCategoryIDCompanyidStatus(cat2.Id,
Constants.CompanyID, (int)Constants.Status.Active);
                       categorylevel3.Sort("CategoryDescription ASC");
                       foreach (MySite.Entities.ProductCategory cat3 in
categorylevel3)
                       {
                           MenuItem mnuCat3 = new MenuItem();
                           mnuCat3.Text = cat3.CategoryDescription;
                           mnuCat3.Value = cat3.Id.ToString();

                          MySite.Entities.TList<MySite.Entities.ProductCategory>
categorylevel4 = menuservice.GetByParentCategoryIDCompanyidStatus(cat3.Id,
Constants.CompanyID, (int)Constants.Status.Active);
                           categorylevel4.Sort("CategoryDescription ASC");
                           foreach (MySite.Entities.ProductCategory cat4 in
categorylevel4)
                           {
                               MenuItem mnuCat4 = new MenuItem();
                               mnuCat4.Text = cat4.CategoryDescription;
                               mnuCat4.Value = cat4.Id.ToString();

                              MySite.Entities.TList<MySite.Entities.ProductCategory>
categorylevel5 = menuservice.GetByParentCategoryIDCompanyidStatus(cat4.Id,
Constants.CompanyID, (int)Constants.Status.Active);
                               categorylevel5.Sort("CategoryDescription
ASC");
                               foreach (MySite.Entities.ProductCategory
cat5 in categorylevel5)
                               {
                                   MenuItem mnuCat5 = new MenuItem();
                                   mnuCat5.Text = cat5.CategoryDescription;
                                   mnuCat5.Value = cat5.Id.ToString();

                                  MySite.Entities.TList<MySite.Entities.ProductCategory>
categorylevel6 = menuservice.GetByParentCategoryIDCompanyidStatus(cat5.Id,
Constants.CompanyID, (int)Constants.Status.Active);
                                   categorylevel6.Sort("CategoryDescription
ASC");
                                   foreach (MySite.Entities.ProductCategory
cat6 in categorylevel6)
                                   {
                                       MenuItem mnuCat6 = new MenuItem();
                                       mnuCat6.Text =
cat6.CategoryDescription;
                                       mnuCat6.Value = cat6.Id.ToString();
                                       mnuCat5.ChildItems.Add(mnuCat6);
                                   }

                                   mnuCat4.ChildItems.Add(mnuCat5);
                               }

                               mnuCat3.ChildItems.Add(mnuCat4);
                           }

                           mnuCat2.ChildItems.Add(mnuCat3);
                       }

                       mnuMain.ChildItems.Add(mnuCat2);
                   }

                   Menu1.Items.Add(mnuMain);
               }

> My code:
Mark Rae [MVP] - 15 Aug 2007 01:06 GMT
> Hello all, I have menu control that works perfect in IE7 however in IE6 it
> is very messed up.  Here is the code I am using to populate it, any ideas?

Difficult to tell without seeing the code...

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

MikeB - 15 Aug 2007 01:10 GMT
Yeah, when I was trying to paste my code I must have hit send somehow....

              MySite.ProductCategoryService menuservice =
newMySite.ProductCategoryService();
              MySite.Entities.TList<MySite.Entities.ProductCategory>
category;
               category =
menuservice.GetByParentCategoryIDCompanyidStatus(0, Constants.CompanyID,
(int)Constants.Status.Active);
               category.Sort("CategoryDescription ASC");

               category =
menuservice.GetByParentCategoryIDCompanyidStatus(0, Constants.CompanyID,
(int)Constants.Status.Active);

               foreach (MySite.Entities.ProductCategory cat1 in category)
               {
                   MenuItem mnuMain = new MenuItem();
                   mnuMain.Text = cat1.CategoryDescription;
                   mnuMain.Value = cat1.Id.ToString();

                  MySite.Entities.TList<MySite.Entities.ProductCategory>
categorylevel2 = menuservice.GetByParentCategoryIDCompanyidStatus(cat1.Id,
Constants.CompanyID, (int)Constants.Status.Active);
                   categorylevel2.Sort("CategoryDescription ASC");
                   foreach (MySite.Entities.ProductCategory cat2 in
categorylevel2)
                   {
                       MenuItem mnuCat2 = new MenuItem();
                       mnuCat2.Text = cat2.CategoryDescription;
                       mnuCat2.Value = cat2.Id.ToString();

                      MySite.Entities.TList<MySite.Entities.ProductCategory>
categorylevel3 = menuservice.GetByParentCategoryIDCompanyidStatus(cat2.Id,
Constants.CompanyID, (int)Constants.Status.Active);
                       categorylevel3.Sort("CategoryDescription ASC");
                       foreach (MySite.Entities.ProductCategory cat3 in
categorylevel3)
                       {
                           MenuItem mnuCat3 = new MenuItem();
                           mnuCat3.Text = cat3.CategoryDescription;
                           mnuCat3.Value = cat3.Id.ToString();

                          MySite.Entities.TList<MySite.Entities.ProductCategory>
categorylevel4 = menuservice.GetByParentCategoryIDCompanyidStatus(cat3.Id,
Constants.CompanyID, (int)Constants.Status.Active);
                           categorylevel4.Sort("CategoryDescription ASC");
                           foreach (MySite.Entities.ProductCategory cat4 in
categorylevel4)
                           {
                               MenuItem mnuCat4 = new MenuItem();
                               mnuCat4.Text = cat4.CategoryDescription;
                               mnuCat4.Value = cat4.Id.ToString();

                              MySite.Entities.TList<MySite.Entities.ProductCategory>
categorylevel5 = menuservice.GetByParentCategoryIDCompanyidStatus(cat4.Id,
Constants.CompanyID, (int)Constants.Status.Active);
                               categorylevel5.Sort("CategoryDescription
ASC");
                               foreach (MySite.Entities.ProductCategory
cat5 in categorylevel5)
                               {
                                   MenuItem mnuCat5 = new MenuItem();
                                   mnuCat5.Text = cat5.CategoryDescription;
                                   mnuCat5.Value = cat5.Id.ToString();

                                  MySite.Entities.TList<MySite.Entities.ProductCategory>
categorylevel6 = menuservice.GetByParentCategoryIDCompanyidStatus(cat5.Id,
Constants.CompanyID, (int)Constants.Status.Active);
                                   categorylevel6.Sort("CategoryDescription
ASC");
                                   foreach (MySite.Entities.ProductCategory
cat6 in categorylevel6)
                                   {
                                       MenuItem mnuCat6 = new MenuItem();
                                       mnuCat6.Text =
cat6.CategoryDescription;
                                       mnuCat6.Value = cat6.Id.ToString();
                                       mnuCat5.ChildItems.Add(mnuCat6);
                                   }

                                   mnuCat4.ChildItems.Add(mnuCat5);
                               }

                               mnuCat3.ChildItems.Add(mnuCat4);
                           }

                           mnuCat2.ChildItems.Add(mnuCat3);
                       }

                       mnuMain.ChildItems.Add(mnuCat2);
                   }

                   Menu1.Items.Add(mnuMain);
               }

>> Hello all, I have menu control that works perfect in IE7 however in IE6
>> it is very messed up.  Here is the code I am using to populate it, any
>> ideas?
>
> Difficult to tell without seeing the code...

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.