﻿<?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?)  » Business Object and StrataFrame controls in User Control</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Sun, 17 May 2026 00:46:20 GMT</lastBuildDate><ttl>20</ttl><item><title>Business Object and StrataFrame controls in User Control</title><link>http://forum.strataframe.net/FindPost22669.aspx</link><description>I would like to use user controls in my web application. However I'm not able to bind strataframe components like textbox etc. on my user control&amp;nbsp;to business object. In one of previous topics about this problem it was mentioned the following:&lt;/P&gt;&lt;P&gt;&lt;FONT color=#111111 size=1&gt;&lt;EM&gt;Web controls are a little different than winforms controls, but you can still use them. You can call whatever strataframe controls you need to inside of your web control, but you will have to take the binding for them into account in the render method of your web control. In winforms it handles the equivelant functions for you, but in web you have to do it yourself. &lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#111111 size=1&gt;&lt;EM&gt;Outside of that, you're free to use them as you wish&lt;/EM&gt;&lt;/FONT&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Could anybody put here a piece of code or a very simple sample that would demonstrate how to do it?&lt;/P&gt;&lt;P&gt;Thank You.&lt;/P&gt;&lt;P&gt;Jiri Brazda&lt;BR&gt;</description><pubDate>Wed, 08 Apr 2009 14:18:41 GMT</pubDate><dc:creator>Jiri Brazda</dc:creator></item><item><title>RE: Business Object and StrataFrame controls in User Control</title><link>http://forum.strataframe.net/FindPost22684.aspx</link><description>Ah....yeah, you will have to implement IBasePage as well on your user control.&amp;nbsp; All SF webcontrols are expecting that implementation.&amp;nbsp; You can look at the BasePage class in the SF source to see how to implement it.</description><pubDate>Wed, 08 Apr 2009 14:18:41 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Business Object and StrataFrame controls in User Control</title><link>http://forum.strataframe.net/FindPost22683.aspx</link><description>OK, I'm trying the first alternative. My usercontrol implemments IWebBusinessBindable with necessary properties like BindingField, BusinessObjectName etc. However I do not know waht to do next? When I put SF TextBox on usercontrol surface and then try to set BusinessObjectName of the SF textbox, the following error is displayed:&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;InvalidCastException&lt;BR&gt;&amp;nbsp; Unable to cast object of type 'System.Web.UI.UserControl' to type 'MicroFour.StrataFrame.UI.Web.IBasePage'.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;Source&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : MicroFour StrataFrame Extensibility&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;Stack Trace: &lt;BR&gt;&amp;nbsp;&amp;nbsp; at ᜅ..ctor(IWindowsFormsEditorService A_0, String A_1, Object A_2)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Extensibility.BusinessObjectNameTypeEditor.EditValue(ITypeDescriptorContext context, IServiceProvider provider, Object value)&lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=1&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=1&gt;&lt;/FONT&gt;</description><pubDate>Wed, 08 Apr 2009 14:07:52 GMT</pubDate><dc:creator>Jiri Brazda</dc:creator></item><item><title>RE: Business Object and StrataFrame controls in User Control</title><link>http://forum.strataframe.net/FindPost22675.aspx</link><description>Well, this would depend on your user control, Jiri.&amp;nbsp; This comment is telling you that you will have to do one of hte following with your custom user control:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Implement IWebBusinessBindable interface to your user control so that you can directly bind an SF BO.&lt;/LI&gt;&lt;LI&gt;Make sure that your control supports a System.Web.UI.DataSourceControl and then bind to it using the WebBusinessBindingSource (SF control).&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;There are some other options as well.&amp;nbsp; But the first thing is that you need to come up with a way to bind your user control to either any binding source or an SF BO or both.&amp;nbsp; Once this is done, then it will make it easier to tell you what may need to be done within your user control.</description><pubDate>Wed, 08 Apr 2009 09:06:54 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>