Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Accessing user control properties

Thread Tools

Accessing user control properties

Posts: n/a

I have a user control that creates a menu structure, based on folders. I
also have another user control that creates sub menu based on files within
those folders.

I need to bring them togethor...

In my folder UC, I am dynamically generating the hyperlink, then adding it
to a place holder. The same with the files UC.

The Folder UC will then dynamically call the file UC for each folder.
However, I need to pass the folder ID so that the files can be generated.

I thought I had done something similar before, but I cannot find it in my
code base.

Here is an example of what i mean...

private void BuildFolders(int ParentFolder
foreach (FolderChild fd in Folders.GetFolders(ParentFolder))
HyperLink newLink = new HyperLink();
newLink.Text = fd.DisplayName.ToString();
newLink.NavigateUrl = fd.Path.ToString() + fd.HomePage.ToString();
newLink.ToolTip = fd.Path.ToString();

Literal BRTag = new Literal();
BRTag.Text = "<br/>";


MenuPlaceHolder.Controls.Add(LoadControl("PagesInF older.ascx"));


catch(Exception ex)
string exc = ex.Message;


As you can see, just before the recursive call to BuildFolders, I am having
a LoadControl. However, I need to pass the folder ID so that I render the
correct pages. How can I do that?

Best regards,
Dave Colliver.
~~ - Local franchises available

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Designer Support: How to have user control's properties appear in IDE's properties window? Max2006 ASP .Net 2 07-13-2007 01:45 PM
Accessing USER CONTROL which is inside Masterpagethrough Another USER Control inside normal page. Kiran More ASP .Net Web Controls 2 11-14-2006 12:58 PM
Accessing Objects properties in User Control tshad ASP .Net 0 08-03-2006 06:24 PM
Accessing Datagrid properties within a user control from the outside Craig G ASP .Net 3 11-30-2004 02:51 PM
accessing the readonly properties of a listmenu with a user control? Moe Sizlak ASP .Net 4 07-17-2004 06:01 PM