Property, user control and FormPanel

  1. #1

    Property, user control and FormPanel

    I throw an exception setting the value of a usercontrol's property when that property try access a control located in a FormPanel.

    Here is sample code:

    - Default.aspx
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
          <ext:ScriptManager ID="extSm" runat="server"/>
            <ext:Panel ID="pnlTest" runat="server">
              <Body>
                <uc:test id="tst1" runat="server" txtWidth="300">
                </uc:test>
              </Body>
            </ext:Panel>
        </form>
    </body>
    </html>

    - ucTest.ascx

    <ext:FormPanel ID="frmPnlTest" runat="server" BodyStyle="padding:5px;">
      <body>
        <ext:FormLayout ID="FormLayout1" runat="server">
          <ext:Anchor Horizontal="100%">
            <ext:TextField ID="txtFldTest" runat="server" FieldLabel="Label" />
          </ext:Anchor>
        </ext:FormLayout>
      </body>
    </ext:FormPanel>
    - ucTest.ascx.vb
    Partial Public Class ucTest : Inherits System.Web.UI.UserControl
    
      ''' <summary>
      ''' Width of the included text field.
      ''' </summary>
      ''' <value></value>
      ''' <returns></returns>
      ''' <remarks></remarks>
      Public Property txtWidth() As System.Web.UI.WebControls.Unit
        Get
          Return txtFldTest.Width
        End Get
        Set(ByVal value As System.Web.UI.WebControls.Unit)
          txtFldTest.Width = value
        End Set
      End Property
    
    End Class
  2. #2

    RE: Property, user control and FormPanel

    Hi,

    It is fixed already. Try to update from SVN
  3. #3

    RE: Property, user control and FormPanel

    Many thanks!

Similar Threads

  1. Replies: 2
    Last Post: Feb 06, 2012, 9:06 AM
  2. Replies: 0
    Last Post: Nov 17, 2011, 10:53 AM
  3. Replies: 3
    Last Post: Oct 12, 2011, 11:31 AM
  4. Replies: 6
    Last Post: Jul 28, 2011, 4:43 PM
  5. Replies: 2
    Last Post: Feb 14, 2010, 6:42 AM

Posting Permissions