A
abhishek dave via .NET 247
(Type your message here)
--------------------------------
From: abhishek dave
hi,
I have a problem regarding dynamically loading of the web page.
As I also want to dynamically load the controls onto the page(which is being dynamically created) inheriting the page
for eg
'this is a class to create a dynamic control
public class txtplus:inherits textbox1
end class
'this class loads the page dynamically
public class pageGenerate:inherits page
dim txtplus1 as txtplus
Public Sub New()
Me.ID = "frm1"
title = New Label()
With title
.ID = "form1"
.Text = "page generate"
.ForeColor = Color.Red
.BackColor = Color.Yellow
End With
txtplus1 = new txtplus()
me.findcontrol("frm1").controls.add(txtplus1)
End Sub
end class
the above class is inherited int the pageGenerate.aspx as
<%@ page inherits = "pageGeneate.aspx"%>
when the aboe code executes it generates an error
'txtplus1' of type 'txtplus' should be placed inside the form tag with
runat = server
please kindly help me to solve this problem
--------------------------------
From: abhishek dave
hi,
I have a problem regarding dynamically loading of the web page.
As I also want to dynamically load the controls onto the page(which is being dynamically created) inheriting the page
for eg
'this is a class to create a dynamic control
public class txtplus:inherits textbox1
end class
'this class loads the page dynamically
public class pageGenerate:inherits page
dim txtplus1 as txtplus
Public Sub New()
Me.ID = "frm1"
title = New Label()
With title
.ID = "form1"
.Text = "page generate"
.ForeColor = Color.Red
.BackColor = Color.Yellow
End With
txtplus1 = new txtplus()
me.findcontrol("frm1").controls.add(txtplus1)
End Sub
end class
the above class is inherited int the pageGenerate.aspx as
<%@ page inherits = "pageGeneate.aspx"%>
when the aboe code executes it generates an error
'txtplus1' of type 'txtplus' should be placed inside the form tag with
runat = server
please kindly help me to solve this problem