﻿<?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?)  » ASP.NET C# questions</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 07:00:29 GMT</lastBuildDate><ttl>20</ttl><item><title>ASP.NET C# questions</title><link>http://forum.strataframe.net/FindPost3767.aspx</link><description>I like the concepts of this framework, but I'm having a few problems. First, I am declaring my business object in the applicationbasepage like this:&lt;/P&gt;&lt;P&gt;&lt;FONT color=#008080 size=2&gt;BusinessObject1&lt;/FONT&gt;&lt;FONT size=2&gt; myBO = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;BusinessObject1&lt;/FONT&gt;&lt;FONT size=2&gt;();&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;Whenever I go to a page in my app that inherits from ApplicationBasePage I cannot see the object I created above. Do I have a scoping issue or something?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Something else that is very frustrating is whenever I compile my business object it does not show up in my toolbox to allow me to drop it on a web form. Are we suppose to drop the&amp;nbsp;business objects&amp;nbsp;on Web Forms or do we reference it some other way? &lt;/P&gt;&lt;P&gt;A C# ASP.NET demo would certainly be helpful.&lt;/P&gt;&lt;P&gt;Any help is greatly appreciated.&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR&gt;Scott&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Mon, 23 Oct 2006 09:40:53 GMT</pubDate><dc:creator>Scott Alexander</dc:creator></item><item><title>RE: ASP.NET C# questions</title><link>http://forum.strataframe.net/FindPost3792.aspx</link><description>Yes, the TypeEditor for the binding looks for public properties that are of a type that is inherited from BusinessLayer... it just so happens that when you define a Public field in VB with the WithEvents keyword, .NET creates a property behind the scenes... so when we use reflection within the type editor, it doesn't see it as a field, but a property.&lt;/P&gt;&lt;P&gt;So, always define your business objects as properties within the ApplicaitonBasePage and you'll be good to go.</description><pubDate>Mon, 23 Oct 2006 09:40:53 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: ASP.NET C# questions</title><link>http://forum.strataframe.net/FindPost3790.aspx</link><description>Trent,&lt;/P&gt;&lt;P&gt;I got it figured out. To answer your question, my Business Object library is a separate project from my application. I've got it referenced in my solution. In order to define my BO in the ApplicationBasePage I declare the following:&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;BusinessObject1&lt;/FONT&gt;&lt;FONT size=2&gt; _MyBO;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;BusinessObject1&lt;/FONT&gt;&lt;FONT size=2&gt; MyBO&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; get&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;._MyBO;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this&lt;/FONT&gt;&lt;FONT size=2&gt;._MyBO = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;value&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;This works well.&lt;/P&gt;&lt;P&gt;Thanks for your input.&lt;/P&gt;&lt;P&gt;Scott</description><pubDate>Mon, 23 Oct 2006 09:28:36 GMT</pubDate><dc:creator>Scott Alexander</dc:creator></item><item><title>RE: ASP.NET C# questions</title><link>http://forum.strataframe.net/FindPost3783.aspx</link><description>Scott,&lt;/P&gt;&lt;P&gt;Are you defining your business objects in the same project as your web project?&amp;nbsp; If so, this could be a problem.&amp;nbsp; ASP.NET does not like to "play nice" with component classes defined within an ASP.NET project.&amp;nbsp; The best thing to do is create a Business Object Library and then place all of your business objects within that library.&amp;nbsp; Your ASP.NET app will then just reference the library and it will make things go much more smoothly.&amp;nbsp; If this doesn't work, I will be more than happy to get you a C# snippet.</description><pubDate>Mon, 23 Oct 2006 07:18:06 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: ASP.NET C# questions</title><link>http://forum.strataframe.net/FindPost3781.aspx</link><description>Trent,&lt;/P&gt;&lt;P&gt;Thanks for the response. Do you have a code snipet in C#. I've tried declaring the object as you suggested (in C#) and it still doesn't seem to work. Just want to be sure I understand.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Scott</description><pubDate>Sun, 22 Oct 2006 20:30:28 GMT</pubDate><dc:creator>Scott Alexander</dc:creator></item><item><title>RE: ASP.NET C# questions</title><link>http://forum.strataframe.net/FindPost3776.aspx</link><description>Scott,&lt;/P&gt;&lt;P&gt;Youa re really close but there is one thing that you need to change.&amp;nbsp; In the ApplicationBasePage you&amp;nbsp;do not create a new instance of the BO...just decalre it.&amp;nbsp; The framework will automatically create and manage the session for you.&amp;nbsp; Which ties into you second question...ASP.NET inherantly does not support the same type of component structure as you are used to in WinForms.&amp;nbsp;&amp;nbsp; So the BOs will not be dropped on any of the pages, the business objects are just declared in an ApplicationBasepage and then any page than inherits that APplicationBasePage will have access to those declared business objects.&lt;/P&gt;&lt;P&gt;So in your ApplicationBasePage, you BO declarations will look somthing like this:&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forum.strataframe.net/Uploads/Images/1bbff5cd-26d2-4596-984b-a6f0.jpg"&gt;&lt;/P&gt;&lt;P&gt;Notice that there is no "New" statement.&amp;nbsp; Just define the BOs and the framework will handle the rest.</description><pubDate>Sun, 22 Oct 2006 11:50:47 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>