Jan 24, 2010, 9:39 AM
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>
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_" & 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_" & dr("Id").ToString()
Dim Coolitepnl = New Coolite.Ext.Web.Panel()
Coolitepnl.ID = "Coolitepnl_" & dr("Id").ToString()
Dim formpnl = New Coolite.Ext.Web.FormPanel()
formpnl.ID = "FormPanel_" & dr("Id").ToString()
Dim formlayout = New Coolite.Ext.Web.FormLayout()
formlayout.ID = "FormLayout_" & dr("Id").ToString
Dim Description = New Coolite.Ext.Web.TextField()
Description.ID = "Description_" & 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)