Last post Aug 02, 2010 02:47 AM by keith b
Jul 08, 2010 11:00 AM|s-stude|LINK
I have some problem to be solved.
There're directories in web service which will construct my webpage's menu and controls.
Example of paths:
*Country - item of the dropdown menu list
*Division - item of the horisontal submenu bulleted list
*Part + *Item + *Control - vertical submenu bulleted list
*Control is a user control which should be loaded when corresponding link was clicked.
I decided to use HttpModule for menu construction and controls loading.
My question is how I could build my menu list dynamicly and dynamicly load controls from HttpModule in connection with ViewState or other asp.net principle?
Is it good practice connect to web service from HttpModule? What about web service timeout and exception handling in HttpModule?
May be i should use some another method instead of HttpModule?
Jul 29, 2010 11:28 AM|keith b|LINK
Yes, I would question why you're choosing an HTTP module for this. HTTP modules are for application-wide functionality. Also, in general you will only be able to access directories and folders within your application's directory tree.
It's very easy to dynamically load controls etc. Provide more detail and I'll be happy to help. Keith
Jul 29, 2010 12:42 PM|s-stude|LINK
I need one entry point to execute my logic.
Something another from page's code behind, smth. more global and abstract.
Main idea is that I need to build my page's controls and menu from folder's child folders.
Look at the picture in example:
Every text / link (Region, Division, Item, Control) are folders and subfolders (divisions are subfolders of region folder, Parrts of Division, Items of Parts, etc. )
When user click to link with "Control" in the name, I need to load custom control to the page, when user will click to another control link, I need to load another control...
That's why I need main entry to build my pages.
Aug 01, 2010 11:56 AM|mave_boy|LINK
Why not create user controls?
Aug 02, 2010 12:25 AM|s-stude|LINK
I'll create user control. I dont know how to build menu dynamicly, and load specific control when user click to menu link.
Aug 02, 2010 02:47 AM|keith b|LINK
s-tude, before you attempt a dynamic-control type of page, I suggest you read all four of Dave Reed's articles on "Truly
Understanding Dynamic Controls." Otherwise, it's going to be a rough ride for you, I fear. Part 4 (the final) actually has an example where he adds controls based on the filesystem.
Good luck! Keith