Convert FormPanel from Html-Code to VB.Net Code

  1. #1

    Convert FormPanel from Html-Code to VB.Net Code

    Hello,

    I try to set a FormPanel dynamicly and would like to convert this FormPanel HTML-Code to VB.Net Code. I need also the ASP:Panel in the code below!

    Could anybody help me to convert the Html-Code to VB.Net Code, please?

    Thanks, a lot!
    Stephan



    <ext:FormPanel ID="FormPanel" runat="server" BodyStyle="padding:5px;" ButtonAlign="Right">
    <Body>
    <ext:FormLayout ID="FormLayout" runat="server">
    <ext:Anchor Horizontal="100%">
    <ext:TextField ID="Description" DataIndex="Description" FieldLabel="Description" runat="server"
    ReadOnly="true" />
    </ext:Anchor>
    </ext:FormLayout>
    </Body>
    </ext:FormPanel>

    
    
    'SEARCH MAIN ELEMENT
    Dim targetRootElement As System.Web.UI.Control
    targetRootElement = Me.FindControl("vpMain")
    
    
    
    Dim pnl = New Panel()
    pnl.ID = "pnlTargetsMain_" &amp; dr("Id").ToString()
    
    
    'SET NEW ASP:PANEL ELEMENT
    If (targetRootElement.FindControl(pnl.ID) Is Nothing) Then
        targetRootElement.Controls.Add(pnl)
    End If
    
    
    
    'SET NEW TARGETROOTELEMENT
    targetRootElement = Me.FindControl("pnlTargetsMain_" &amp; dr("Id").ToString()
    
    
    Dim Coolitepnl = New Coolite.Ext.Web.Panel()
    Coolitepnl.ID = "Coolitepnl_" &amp; dr("Id").ToString()
    
    
    Dim formpnl = New Coolite.Ext.Web.FormPanel()
    formpnl.ID = "FormPanel_" &amp; dr("Id").ToString()
    
    
    
    Dim formlayout = New Coolite.Ext.Web.FormLayout()
    formlayout.ID = "FormLayout_" &amp; dr("Id").ToString
    
    
    Dim Description = New Coolite.Ext.Web.TextField()
    Description.ID = "Description_" &amp; dr("Id").ToString()
    Description.AutoWidth = True
    Description.DataIndex = "Description"
    Description.FieldLabel = "Description"
    Description.ReadOnly = True
    
    
    formlayout.Anchors.Add(Description)
    formpnl.Controls.Add(formlayout)
    Coolitepnl.Controls.Add(formpnl)
    pnl.Controls.Add(Coolitepnl)
  2. #2

    RE: Convert FormPanel from Html-Code to VB.Net Code

    I find the solution. I must change the property Controls to BodyControls.

Similar Threads

  1. [CLOSED] Html code to Ext:label
    By canbay in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 26, 2012, 1:08 PM
  2. Replies: 0
    Last Post: Dec 01, 2011, 6:43 AM
  3. Ext.NET HTML compliant code (and accessibility)
    By Tallmaris in forum 1.x Help
    Replies: 5
    Last Post: Jul 31, 2011, 8:27 AM
  4. Replies: 0
    Last Post: Jun 21, 2011, 2:51 AM
  5. help for a begginer - part II - convert code to .VB
    By julioc_m18 in forum 1.x Help
    Replies: 3
    Last Post: Feb 11, 2011, 6:32 AM

Posting Permissions