By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,987 Members | 1,552 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,987 IT Pros & Developers. It's quick & easy.

HELP - Using UIP App. Block for .aspx Pages that Contain .ascx User Controls

P: n/a
I'm using v2 of the UIP App. Block. I've created all my .aspx pages, all of which contain .ascx user controls. The .ascx user controls provide the standard server controls (i.e., LinkButtons, etc.) for the user to navigate the site and perform their tasks. None of the site's actual functionality is contained in the .aspx pages--they're just kinda containers for all the .ascx user controls.

So, I'm to the point in the UIP App. Block where I need to make each ..aspx page inherit from Microsoft.ApplicationBlocks.UIProcess.WebFormView. This is easy enough. However, as I mentioned above, my controls to actually do the task(s) are in the .ascx user controls. Thus, my .ascx user controls cannot access the controller.

How can I solve this problem?

..aspx pages, by default inherit from System.Web.UI.Page, and this is easily replaced. However, .ascx user controls inherit from System.Web.UI.UserControl. Can I simply replace System.Web.UI.UserControl with Microsoft.ApplicationBlocks.UIProcess.WebFormView for my .ascx user controls similar to how the .aspx pages are handled?

Or, is there another solution to this problem?

Thanks.

Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi Peter,

Peter Jackson wrote:
I'm using v2 of the UIP App. Block. I've created all my .aspx pages,
all of which contain .ascx user controls. The .ascx user controls
provide the standard server controls (i.e., LinkButtons, etc.) for the
user to navigate the site and perform their tasks. None of the site's
actual functionality is contained in the .aspx pages--they're just kinda
containers for all the .ascx user controls.

So, I'm to the point in the UIP App. Block where I need to make each
.aspx page inherit from
Microsoft.ApplicationBlocks.UIProcess.WebFormView. This is easy
enough. However, as I mentioned above, my controls to actually do the
task(s) are in the .ascx user controls. Thus, my .ascx user controls
cannot access the controller.

How can I solve this problem?


I've just started evaluating UIP2.0, but maybe I still have a good
solution: look into the source code of the UIP and find out how
WebFormView is implemented. I'm pretty sure that you can make your own
WebUserControlView or something like that, and use that for your
controls... while WebFormView inherits from Page, your new class would
inherit from UserControl, and there you go (I'm not in the code right
now, but it may be that this is the only change you'll have to make).

kind regards,
david
Nov 18 '05 #2

P: n/a
Re-hi Peter,

Holger (David) Wagner wrote:
Peter Jackson wrote:
How can I solve this problem?


I've just started evaluating UIP2.0, but maybe I still have a good
solution: look into the source code of the UIP and find out how
WebFormView is implemented. I'm pretty sure that you can make your own
WebUserControlView or something like that, and use that for your
controls... while WebFormView inherits from Page, your new class would
inherit from UserControl, and there you go (I'm not in the code right
now, but it may be that this is the only change you'll have to make).


Oh, another solution (maybe simpler): you can access the Page
(parentpage or something like that) from your ascx-controls, cast them
to WebFormView and there you go... I guess the "WebUserControlView"
solution is more elegant, though...

kinda regards,
david
Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.