ASP.NET C# questions


Author
Message
Scott Alexander
Scott Alexander
StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)
Group: Forum Members
Posts: 6, Visits: 11
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:

BusinessObject1 myBO = new BusinessObject1();

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?

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 business objects on Web Forms or do we reference it some other way?

A C# ASP.NET demo would certainly be helpful.

Any help is greatly appreciated.

Thanks,
Scott

 


Reply
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Scott,

Youa re really close but there is one thing that you need to change.  In the ApplicationBasePage you do not create a new instance of the BO...just decalre it.  The framework will automatically create and manage the session for you.  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.   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.

So in your ApplicationBasePage, you BO declarations will look somthing like this:

Notice that there is no "New" statement.  Just define the BOs and the framework will handle the rest.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search