CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 6/13/2005 12:10:24 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 19 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages 1 |< << Go >> >|
justin_t
Asp.Net User
Menu Control Issue6/13/2005 12:10:24 PM

0/0

Hey everybody.

I'm sure I could find the answer to this question if I searched long enough, but it is easier to post on here since some of you can quickly answer questions.

Here's the scenario:

Index.aspx (web form) - Has a menu control (ASP 2.0)
Index.aspx.cs (code behind)
ReportSelect.cs (class w/ method for gathering data for menu control)

I want the ReportSelect class to populate the data "AND" add each of the records to the Menu control.  Right now, I have a method as follows:

<code>

public Menu DisplayCategories()

{

varDBConnector = new DBConnector();

dtCatTitles = new DataTable();

ReportSelect varRptSel = new ReportSelect();

DBConnector varDBConn = new DBConnector();

 

tnCatNode = new TreeNode();

DataSet dst = varDBConn.GetCategories();

varDBConn.CloseConn();

dst.Relations.Add("Children", dst.Tables["Category"].Columns["CatID"], dst.Tables["Report"].Columns["CatID"]);

 

foreach (DataRow masterRow in dst.Tables[0].Rows)

{

MenuItem masterItem = new MenuItem((string)masterRow["Name"]);

Menu1.Items.Add(masterItem);

foreach (DataRow childRow in masterRow.GetChildRows("Children"))

{

MenuItem childItem = new MenuItem((string)childRow["Title"]);

masterItem.ChildItems.Add(childItem);

 

}

}

return Menu1;

}

</code>

However, when the Menu1 variable is returned to the index.aspx.cs codebehind, the data does not show when the app is run.  Any suggestions would be helpful. 

dannychen
Asp.Net User
Re: Menu Control Issue6/13/2005 5:44:50 PM

0/0

If I understand you correctly.  You have a reusable class called ReportSelect in it's own file which is supposed to do DB access and populate a Menu control.  Is the code you're showing from the ReportSelect class? How does your ReportSelect class get a handle to Menu1?  Where is this code being called from? 
--
Danny


disclaimer: Information provided is 'as is' and conveys no warranties or guarantees.
Dave Sussman
Asp.Net User
Re: Menu Control Issue6/14/2005 8:36:17 AM

0/0

Personally I think you're better of using the provider architecture. Don't build the menu manually but write a SiteMapProvider that fetches the data from your database; this can then be used to populate the menu, as well as providing integration with the SiteMapPath. There's a sample available at http://www.ipona.com/samples/ - pick the VBUG Navigation one.

Dave

3 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Beginning ASP.NET 3.5: In C# and VB Authors: Imar Spaanjaars, Pages: 734, Published: 2008
Absolute Beginner's Guide to Programming Authors: Greg M. Perry, Pages: 432, Published: 2002
Beginning ASP.NET 3.5 in VB 9.0: From Novice to Professional Authors: Matthew MacDonald, Pages: 1149, Published: 2007
Beginning SUSE Linux: From Novice to Professional Authors: Keir Thomas, Pages: 514, Published: 2005
The Psychology of Menu Selection: Designing Cognitive Control at the Human/computer Interface Authors: Kent L. Norman, Pages: 350, Published: 1991
Everything a Working Mother Needs to Know about Pregnancy Rights, Maternity Leave, and Making Her Career Work for Her Authors: Anne Cicero Weisberg, Carol A. Buckler, Pages: 235, Published: 1994
Management by Menu: Study Guide Authors: Lendal Henry Kotschevar, Diane Withrow, Pages: 144, Published: 2007
Instrument Engineers' Handbook: Process Control and Optimization Authors: Bela G. Liptak, Pages: 2464, Published: 2005
Troubleshooting Your PC for Dummies Authors: Dan Gookin, Pages: 366, Published: 2008

Web:
CodeProject: Populating Menu Control in ASP.NET 2.0 - using ... An article on how to populate the Menu control in ASP.NET 2.0 using different data sources.; ... These questions scream issues with the article. ...
Asp.Net Menu Control Binding with XMLDataSource - Binding ... This article explains the concept of building dynamic navigation control in web applications using Asp.Net Menu Control binding with XMLDataSource. ...
ASP.NET Menu Control Overview The ASP.NET Menu control allows you to develop both statically and dynamically displayed menus for your ASP.NET Web pages. You can configure the contents of ...
Extending ASP.NET 2.0 Menu Control To Have Tabs With Rounded Corners The ASP.NET Menu Control normally produces tabs which have rectangular edges. The techniques presented extend the control to create tabs with rounded ...
Playing around with Menu Control in ASP.NET 2.0 Sep 17, 2005 ... Playing around with Menu Control in ASP.NET 2.0. Asp.net 2.0 is comming soon ( I mean officially released final version ) and its bringing ...
Menu Control Refresh Problem - ASP.NET Forums Re: Menu Control Refresh Problem. 08-07-2008, 3:45 PM. Contact ... Shail. Re: Menu Control Refresh Problem. 08-08-2008, 4:12 AM. Contact ...
Menu control issue.... Default Menu control issue.... I am trying to use the menu control for a tabbed menu system but it's frustrating the hell out of me. ...
ASP.Net Menu Control problem or is it IE? | The Coffeehouse ... Aug 9, 2006 ... I want to send feedback to the ASP.Net team about a problem I'm having with the Menu Control. I need someone to confirm whether the results ...
Issue with ASP.net menu control......catch 22!! : Microsoft ... Hi, I have been developing a website and have run into a problem that I have no idea to solve. I am using 2 asp:menu controls on the same page: ...
Stefan Goßner : Problem with the ASP.NET 2.0 menu control and MCMS A couple of customers reported problems when using the menu control with ASP.NET 2.0 and MCMS. After analyzing one of the affected projects I identified ...

Videos:
BannedStory Chat Bubble Fix. Are you having the problem like many others where your chat bubble function isn't working? The problem is Adobe Air, the new version has some glitc...
Drupal for intranet - Menu per role Out of the box, drupal allows editors with 'admin menu' permission to edit all menus and menu-items. There is no finer graned control over that. The...
R4Z0Rz hack with LiNk http://rapidshare.com/files/140502771/R4Z0Rz..rar.html this is the hack http://rapidshare.com/files/140502771/R4Z0Rz..rar.html Have Fun! + Aim Help System * Pure Vector Based Aimbot - Fastest Aimbot Avail...
Nintendo DS User Review 2726 A look at the innovative features in the newest portable gaming system from Nintendo. Rate this video or find more video product reviews in the Vide...
793-MIT #17...MORAL CRUSADERS complaint (read menu) & Easy Explanation of Guitar Modes MORAL CRUSADERS complaint:)) marijuana http://www.adventuresinlegalland.com/index.php?/content/view/20/27/ Notice in the cases cited above there ar...
vBag M600i My problem is that to we cant control menu
Docs for the Web: PDF and More Not all web documents are created equal. Creating documents that are easily viewable and viewable in a way that you want them to be seen all across t...
Speedup Computer Hi! Im Umair Sheikh (Umee). I will show you how to speedup Computer in just simple steps Notepad makes the computer Fast •Open Notepad •Type mystri...
Akha Ethnocide- Gods Love On the Issue on Paul W. Lewis's Dissertation Titled: "An Introduction of Family Planning Program to Akhas in Thailand" in which the University of Ore...
FF6 - Low Level Game Part VI - Dadaluma & Ultros 2 The challenge goes on and things finally start to get harder. Even though the video may not show the difficulty of this point in the game, I have to ...




Search This Site:










how to refresh the parent page?

collecting data from multiple pages

restoring a complete site.

looping thru all elements on a page

moving portals

forcing users to use sub-tags

setting the top property of label relative to another label

upgrade from 3.0.13 to 3.1 error

onclick of image element

namespace

keep tab indents in vs 2005

composite control simple custom property problem

item has already been added. key in dictionary: 'cbo_' key being added: 'cbo_'

tab strip control - tabs added dynamically

portalvb/login.aspx?returnurl=%2fportalvb%2fdesktopdefault.aspx

gridview pagerstyle

creating help files through c#.net

returning an @@identity value from the sql dataprovider

include an aspx in c#

module coding

calculating totals from data in a gridview and displaying in a custom field?

project error after upgrade

is there a telerik r.a.d. menu module?

developing in orcas, but deploying it on a .net 2.0 framework environment

strange error found in searchdatastore

paypal add to cart button not working with masterpage

photo resolution - best option for albulms

warning supressing

oracle developer tools

problem in viewing asp.net page in ie7 and firefox

 
All Times Are GMT