StrataFrame Forum

Using WebBusinessBindingSource

http://forum.strataframe.net/Topic11685.aspx

By PeterA - 9/25/2007

I'm trying to bind a GridView control to a business object using the WebBusinessBindingSource object. I get the WBBS object added to my ASP.NET page with no problem and tell it which business object to use. However, when I bind the GridView to the WBBS, I get an ArgumentNullException (see the attached image).



Is there a property I need to change to make the GridView work with the WBBS?



Thanks!
By StrataFrame Team - 9/26/2007

Working with the VSTypeReslutionService can cause some problems... sometimes you have to build the project and reload VS before the DLLs within the IDE are refreshed for use.  So, once you set the business object, save the files, build the project, and reload Visual Studio.
By PeterA - 9/26/2007

I added the WBBS to the page, set the business object on the WBBS, saved the page, closed and re-opened VS. Same problem (and that error pops up multiple times).



I then tried setting the DataSourceID property on the gridview, saved the page, closed and re-opened VS. Still occurred after that, too.



Anything else I can try?



Thanks!
By StrataFrame Team - 9/27/2007

Is the page using code-behind or is all of the .NET code in <script> tags?
By StrataFrame Team - 9/27/2007

Oh, and is this a Web Site, or a Web Application Project?
By PeterA - 9/28/2007

Ben Chase (09/27/2007)
Oh, and is this a Web Site, or a Web Application Project?




This is all being done with a code-behind and is an Web Application project.



Thanks!
By PeterA - 10/2/2007

Has there been any progress on this? Is it a bug? Did I set something up wrong?



Thanks!
By StrataFrame Team - 10/2/2007

I just added some more if tests to the GetPageType() method to throw more detailed exceptions when something goes wrong.  It's part of the Extensibility DLL, but before I send you all of the new assemblies, there is one last thing we can check... can you post the <@ > page declarations from the .aspx page that is giving you the problem?  We parse those off trying to find the ApplicationBasePage type to retrieve and it looks like the parsing is failing.
By PeterA - 10/2/2007



<%@ Page Language="C#" EnableTheming="true" Theme="Default" StylesheetTheme="Default" MasterPageFile="../Design/mm.Master" AutoEventWireup="true" CodeBehind="detail.aspx.cs" Inherits="Company.BusinessArea.Application.Page" Title="Page Title" %>





This the page declaration from one of the pages. The other one I tried it on is set up in the same way, just has a different CodeBehind attribute declaration.



Thanks!
By PeterA - 10/9/2007

Ben Chase (10/02/2007)
I just added some more if tests to the GetPageType() method to throw more detailed exceptions when something goes wrong. It's part of the Extensibility DLL, but before I send you all of the new assemblies, there is one last thing we can check... can you post the <@ > page declarations from the .aspx page that is giving you the problem? We parse those off trying to find the ApplicationBasePage type to retrieve and it looks like the parsing is failing.




Has there been any progress on the new assemblies? Anything else I might be able to try?



Thanks!
By StrataFrame Team - 10/11/2007

OK, I've added some catches and more detailed descriptions when an unexpected condition is encountered.  I also loosened the RegEx that parses off the base page class name, so give this one a try and see if it works.  You'll need to shutdown VS, copy the DLLs to your C:\Program Files\Common Files\MicroFour\StrataFrame folder and also drag them into the C:\Windows\Assembly folder.  Then restart VS and let me know what happens.
By PeterA - 10/12/2007

Well, the error still occurred, but it was much more specific. Not sure how to go about fixing it, though.



Thanks!
By StrataFrame Team - 10/15/2007

Could you email me the .aspx page and the .cs page for that page.  We're parsing the EnvDTE.CodeModel and for some reason, it doesn't thing that the class has a base class.  You can email it to support@strataframe.net.  Thanks.
By PeterA - 10/18/2007

Ben Chase (10/15/2007)
Could you email me the .aspx page and the .cs page for that page. We're parsing the EnvDTE.CodeModel and for some reason, it doesn't thing that the class has a base class. You can email it to support@strataframe.net. Thanks.




Any luck tracking this down? Did you receive the files OK?



Thanks!
By StrataFrame Team - 10/19/2007

The code model had a few elements with "Not Supported" properties within that file so it was throwing an exception we weren't expecting.  I plugged the holes, so give this one a try.  Usual steps: copy to C:\Program Files\Common Files\MicroFour\StrataFrame, drag to C:\Windows\Assembly, restart VS.
By PeterA - 10/19/2007

Ben Chase (10/19/2007)
The code model had a few elements with "Not Supported" properties within that file so it was throwing an exception we weren't expecting. I plugged the holes, so give this one a try. Usual steps: copy to C:\Program Files\Common Files\MicroFour\StrataFrame, drag to C:\Windows\Assembly, restart VS.




That took care of it. Thanks!