﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WebForms (How do I?)  » BOs have value of Nothing on Page Load</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Fri, 17 Apr 2026 09:36:48 GMT</lastBuildDate><ttl>20</ttl><item><title>BOs have value of Nothing on Page Load</title><link>http://forum.strataframe.net/FindPost29387.aspx</link><description>Hi,&lt;br/&gt;&lt;br/&gt;Suspect I&amp;nbsp;have missed something obvious here but have not been able to find&amp;nbsp;the cause.&lt;br/&gt;&lt;br/&gt;I created a SF Web Application project in VS2010 and have created a SF webform based on a master page.&lt;br/&gt;&lt;br/&gt;I added the business object definitions to the application base page.&lt;br/&gt;&lt;br/&gt;I set the page I created to the "Start&amp;nbsp;Page" for the app. When&amp;nbsp;I run the app and look in the debugger the BOs have a value of "Nothing" in the page load event. &amp;nbsp;I&amp;nbsp;looked at the sample web application but could&amp;nbsp;locate where the BOs are being instantiated when the application starts.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br/&gt;&lt;br/&gt;If I set the Start Page to&amp;nbsp;Default.Aspx I get an error when I try to run the application:&lt;br/&gt;&lt;br/&gt;&lt;img src="http://forum.strataframe.net/Uploads/Images/ad526990-4eb9-4260-801d-4d32.png"/&gt;&lt;br/&gt;&lt;br/&gt;What am I missing?&lt;br/&gt;&lt;br/&gt;TIA,&lt;br/&gt;&lt;br/&gt;Andy</description><pubDate>Wed, 26 Jan 2011 09:10:16 GMT</pubDate><dc:creator>Andrew Harper</dc:creator></item><item><title>RE: BOs have value of Nothing on Page Load</title><link>http://forum.strataframe.net/FindPost29448.aspx</link><description>In VB.NET StrataFrame will create the instance and you don't have to specified the "New."&amp;nbsp; In C#, you have to define these as properties, so you must specify the "new" as part of the property definition.&amp;nbsp; I am a bit stumped as to what is going on within your environment.&amp;nbsp; This really isn't rocket science here, and there isn't that much that can go wrong.&amp;nbsp; What add-ons and other products do you have loaded on your development machine?</description><pubDate>Wed, 26 Jan 2011 09:10:16 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: BOs have value of Nothing on Page Load</title><link>http://forum.strataframe.net/FindPost29436.aspx</link><description>Hi Trent,&lt;br/&gt;&lt;br/&gt;Thanks for you efforts trying to sort this out - I believe that I have found the cause of this problem.&lt;br/&gt;&lt;br/&gt;I ran the sample application that you sent me on a different computer running VS2010 yesterday and got the same result as shown in my earlier post. What I found however was if I&amp;nbsp;added a quick watch the object was instantiated&amp;nbsp;and&amp;nbsp;if I continued the grid did display. see attached screen shots. I tried again on my computer and got the same results.&lt;br/&gt;&lt;br/&gt;I looked at&amp;nbsp;your BO definition in &amp;nbsp;the applicationbasepage.cs&lt;br/&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;strong&gt;private CustomersBO _Customers = new CustomersBO();&lt;br/&gt;&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;I use VB not C# but what stood out was the &lt;strong&gt;new &lt;/strong&gt;keyword. In my applicationbasepage.vb I had declared&amp;nbsp;my BOs as using&lt;br/&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;strong&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;Public&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;WithEvents&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; Customers &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;As&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; CustomersBO&lt;/font&gt;&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;&lt;font size=2&gt;as this was what was used in the StrataFrame sample application. This definition would result in my application working under VS2008 but not under VS2010. If I changed this definition to &lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;strong&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;Public&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;WithEvents&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; Customers &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;As&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; New CustomersBO&lt;/font&gt;&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;&lt;font size=2&gt;my application ran correctly under VS2010. &lt;/font&gt;&lt;br/&gt;&lt;br/&gt;I have looked at the compile options for in VS2008 &amp;amp; VS2010 and they seem to be set the same in both case. (explicit on, strict off, infer on). If there has been a change in behaviour between the V2008 &amp;amp; VS2010 then I am happy to add the new keyword in VS2010 - what I can't understand (yet!) is why the Strataframe VB Web Sample runs under VS2010 as it does not include the new keword in the BO definitions,&lt;br/&gt;&lt;br/&gt;Best regards,&lt;br/&gt;&lt;br/&gt;Andy</description><pubDate>Mon, 24 Jan 2011 13:54:12 GMT</pubDate><dc:creator>Andrew Harper</dc:creator></item><item><title>RE: BOs have value of Nothing on Page Load</title><link>http://forum.strataframe.net/FindPost29426.aspx</link><description>Sent you a PM with a link.</description><pubDate>Fri, 21 Jan 2011 09:48:17 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: BOs have value of Nothing on Page Load</title><link>http://forum.strataframe.net/FindPost29425.aspx</link><description>Still working on that build...sorry for the delay &lt;span&gt;:blush:&lt;/span&gt;</description><pubDate>Fri, 21 Jan 2011 09:44:00 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: BOs have value of Nothing on Page Load</title><link>http://forum.strataframe.net/FindPost29418.aspx</link><description>Before you do...let me give you a beta SF build just to make sure that there isn't something underlying that I am not thinking about.&amp;nbsp; Hold on for just a bit :)</description><pubDate>Fri, 21 Jan 2011 07:50:34 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: BOs have value of Nothing on Page Load</title><link>http://forum.strataframe.net/FindPost29410.aspx</link><description>[quote][b]Trent L. Taylor (1/20/2011)[/b][hr]You are trying to run an Express version are you?&amp;nbsp; Also, as an aside, I would definitely go with VS 2010...major enhancements and a far better development environment.&amp;nbsp; If you are doing new development, you are going to want to start in VS 2010 instead of VS 2008.[/quote]&lt;br/&gt;&lt;br/&gt;I have&amp;nbsp;the full version of VS2010Pro, installed&amp;nbsp;from MSDN CD. From memory I had vs2003, vs2005 and vs2008 and Strataframe&amp;nbsp;already installed.&lt;br/&gt;&lt;br/&gt;I then installed VS2010, uninstalled Strataframe, downloaded the latest version of Strataframe and then reinstalled Strataframe so&amp;nbsp;options would appear in VS2010.&lt;br/&gt;&lt;br/&gt;I agree that this would appear to an environmental issue. I could re-install Strataframe and VS2010 and if you think thats worth a shot,&lt;br/&gt;&lt;br/&gt;Best regards,&lt;br/&gt;&lt;br/&gt;Andy</description><pubDate>Thu, 20 Jan 2011 14:33:27 GMT</pubDate><dc:creator>Andrew Harper</dc:creator></item><item><title>RE: BOs have value of Nothing on Page Load</title><link>http://forum.strataframe.net/FindPost29409.aspx</link><description>You are trying to run an Express version are you?&amp;nbsp; Also, as an aside, I would definitely go with VS 2010...major enhancements and a far better development environment.&amp;nbsp; If you are doing new development, you are going to want to start in VS 2010 instead of VS 2008.</description><pubDate>Thu, 20 Jan 2011 13:41:16 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: BOs have value of Nothing on Page Load</title><link>http://forum.strataframe.net/FindPost29408.aspx</link><description>Wow...I ran this on two different machines and environments.&amp;nbsp; So this tells me that there is something fishy with your development environment.&amp;nbsp; I can't imagine the changes that have been made in SF would have an effect on this, but I will do a build and let you have a beta version and see if this resolves the problem.&lt;br/&gt;&lt;br/&gt;&lt;img src="http://forum.strataframe.net/Uploads/Images/4091e23f-d0e5-4b5f-a738-db17.png" alt="http://forum.strataframe.net/Uploads/Images/4091e23f-d0e5-4b5f-a738-db17.png" /&gt;</description><pubDate>Thu, 20 Jan 2011 13:39:54 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: BOs have value of Nothing on Page Load</title><link>http://forum.strataframe.net/FindPost29407.aspx</link><description>Hi Trent,&lt;br/&gt;&lt;br/&gt;I loaded your sample application and ran it under VS2010. I got the same issue with the BO as before unfortunately.&lt;br/&gt;&lt;br/&gt;I have attached a screenshot of the debugger display for your reference,&lt;br/&gt;&lt;br/&gt;Best regards,&lt;br/&gt;&lt;br/&gt;Andy&amp;nbsp;</description><pubDate>Thu, 20 Jan 2011 13:22:34 GMT</pubDate><dc:creator>Andrew Harper</dc:creator></item><item><title>RE: BOs have value of Nothing on Page Load</title><link>http://forum.strataframe.net/FindPost29406.aspx</link><description>Hi Trent,&lt;br/&gt;&lt;br/&gt;Thanks for the sample, I will load, test and reply. In all my tests&amp;nbsp;so far &amp;nbsp;have been using the VB.Net SF Web Application Project template. &lt;br/&gt;&lt;br/&gt;Subsequent to my original post I repeated the process in a W7 virtual machine that only had VS2010 and Strataframe freshly installed. My main XP development machine has vs2003, vs2005, vs2008 and vs2010 installed. In the W7 VM the Default.aspx file still had the same issue with the inherits statement but once I had fixed this the solutuon built without error and the BO's were instantiating correctly.&amp;nbsp;I did however have problem with this&amp;nbsp;setup where the&amp;nbsp;microfour assemblies were not visible&amp;nbsp; in the 'Add Reference' dialogue. I found another post in these forums that solved this issue.&lt;br/&gt;&lt;br/&gt;At this stage I will stick to VS2008 as there&amp;nbsp;are no compelling reasons for me to use VS2010.&lt;br/&gt;&lt;br/&gt;I appreciate your help,&lt;br/&gt;&lt;br/&gt;Best regards,&lt;br/&gt;&lt;br/&gt;Andy&amp;nbsp;</description><pubDate>Thu, 20 Jan 2011 13:03:08 GMT</pubDate><dc:creator>Andrew Harper</dc:creator></item><item><title>RE: BOs have value of Nothing on Page Load</title><link>http://forum.strataframe.net/FindPost29396.aspx</link><description>Andrew,&lt;br/&gt;&lt;br/&gt;I think that there may be more of a setup issue here in regards to setting up a web project.&amp;nbsp; Since this could have turned into a really long post, I have created you a sample.&amp;nbsp; I used the VS2010 C# template and created this sample.&amp;nbsp; I created a business object project and a web project.&amp;nbsp; If you look the ApplicationBasePage, you will see how the BO is defined in C#. &lt;br/&gt;&lt;br/&gt;This sample uses the StrataFrameSample database and the customers table.&amp;nbsp; Also, if you run into any issues, let me know and I can give you a beta build.&amp;nbsp; We will be pushing out a build before long that has a number of fixes, etc.&amp;nbsp; Including some C# web templates that were being a little argumentative :) But I don't think that this has anything to do with your current issue.&lt;br/&gt;&lt;br/&gt;Let me know.&amp;nbsp; Thanks.</description><pubDate>Thu, 20 Jan 2011 08:50:56 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: BOs have value of Nothing on Page Load</title><link>http://forum.strataframe.net/FindPost29388.aspx</link><description>&lt;font color=#000000&gt;I created the same project using VS2008 and&amp;nbsp;checked what the generated default.aspx&amp;nbsp;inherits from. In this case&amp;nbsp;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;font color=#ff0000 size=2&gt;&lt;font color=#ff0000 size=2&gt;Inherits&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;="WebApplication13._Default"&lt;/font&gt;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#000000&gt;I then changed the VS2010 default.aspx to use the same setting and it no longer generates&amp;nbsp;the error and displays correctly.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#000000&gt;I have not been able to determine the problem with the BOs defined in ApplicationBasePage.vb not being instantiated when a form loads. The same pages&amp;nbsp;work correctly when copied to VS2008 and recompiled.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#000000&gt;Is VS2008 the preferred option for web development at this&amp;nbsp;stage?&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#000000&gt;Are there any other values that are generated by the Strataframe Web Application template in VS2010 that have to be changed to get it working correctly?&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#000000&gt;TIA &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#000000&gt;Andy&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;/font&gt;&amp;nbsp; </description><pubDate>Wed, 19 Jan 2011 04:01:39 GMT</pubDate><dc:creator>Andrew Harper</dc:creator></item></channel></rss>