473,771 Members | 2,406 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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.Appli cationBlocks.UI Process.WebForm View. 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.P age, and this is easily replaced. However, .ascx user controls inherit from System.Web.UI.U serControl. Can I simply replace System.Web.UI.U serControl with Microsoft.Appli cationBlocks.UI Process.WebForm View 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
2 1809
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.Appli cationBlocks.UI Process.WebForm View. 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
WebUserControlV iew 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
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
WebUserControlV iew 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 "WebUserControl View"
solution is more elegant, though...

kinda regards,
david
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3024
by: paul meaney | last post by:
All, myself and another developer have been staring blankly at a screen for the past 48 hours and are wondering just what stunningly obvious thing we are missing. We are trying to load up 2 or more user controls dynamically by adding to a placeholder defined in page_load. I've included the sample code for how we are accessing one. The user controls are not rocket science - just a few text boxes with public accessor properties. We've...
3
1298
by: Brent Minder | last post by:
What is the most efficient way to code asp.net pages when you break your page up into user controls? For example: If you have a page with a header (control .ascx), body, and footer (control .ascx) for a given page and you need to access functions within a class (bizUtil say) should you declare the bizUtil object on the header and footer in both the aspx and aspx.vb pages? That's FOUR references! This seems bloatful (my new word).
2
3219
by: Mr Wizard | last post by:
I am going through the front controller http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpatterns/html/ImpFrontControllerInASP.asp and all works well except when the server.transfer occurs. I get invalid IsPostBack results which I believe can fixed using the patch in KB:821156. How do I get this patch? Another question in the same pattern is when using LoadConrol to load a .ascx file I get "maps to another application,...
0
357
by: John Crowley | last post by:
I keep running into this over and over again... I want a block server control that renders a header and footer, and child controls in between. But I don't want a templated control, for the following reasons: 1) Render blocks are not allowed inside a templated control. 2) I want the inner controls scoped at the parent aspx (or ascx), not at the template naming container. This type of control would be ideal for website headers and...
3
1497
by: thedebugger | last post by:
Dear Friends, I am working on website application in c# with asp.net. My practice using aspx files is, I have 1 main aspx files for inside pages. Whenever user hit the button like aboutus, contactus and similar buttons, also any other button from menu, it always call contentDisplay.aspx, including pageid and other ids depending upon contents. for example, aboutus button contain the url like contentDisplay.aspx?pageid=2 contactus button...
5
1517
by: Dan Nash | last post by:
Hi all, I've got a page with a user control on, added via VS. I'm trying to get to a property of the user control (or more precisely, a public var). Here's the code at the top of my aspx page... <%@ Register TagPrefix="dI2" TagName="dartsUC_rolodexsearch" Src="dartsUC_rolodexsearch.ascx" %>
2
3112
by: Ric | last post by:
im new to asp.net. from what i understand, you have the aspx file (presentation), user-control(ascx file), code-behind(vb file) and components(compiled vb and dll files). the aspx file contains a reference to the ascx which can contain a reference to a component. can an aspx file contain a reference to an ascx file which contains a reference to a code-behind file? ive tried to do this then load the user-control via LoadControl(), but i...
3
2238
by: Tim::.. | last post by:
Can someone please help.... I'm having major issues with a user control I'm tring to create! I an trying to execute a sub called UploadData() from a user control which I managed to do but for some reason I keep getting the error: Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
11
2135
by: Brad Baker | last post by:
I'm building a small web application - I started out placing all my code in one file (config.aspx). As I continue to add code though it was becoming very unwieldy. After doing some searching online I found an article which suggested I might place some of the code into web user controls. I created two new files (general_info.ascx and store_front.ascx) and placed two chunks of code in each. I then registered the controls at the top of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10261
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10103
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10038
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9911
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8934
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.