Ask a Question related to ASP.NET General, Design and Development.
-
Quentin #1
ascx... in a class.vb
I made a class in an other
file than the aspx one. This class is juste an HtmlTable, it looks like a
window, and i'd like to add a property to this class as to add an ascx in a
cell. My english is not so good so let me give you an example.
--------MesClasses.vb-----------------------
Public Class MaFenetre : inherits WebControl
Public Sub New()
Dim Fenetre As New HtmlTable
Dim MaLigne As New HtmlTableRow
Dim MaCellule As New HtmlTableCell
Dim MyObjectAscx As ?????
MaCellule.Controls.Add(MyObjectAscx)
MaLigne.Cells.Add(MaCellule)
Fenetre.Rows.Add(MaLigne)
Fenetre.Width = "100%"
Fenetre.height = "100%"
Me.Controls.Add(Fenetre)
End Sub
Public Property InnerPage As String
Get
Return InnerPage
End Get
Set(ByVal Value As String)
InnerPage = Value
MyObjectAscx.Path = InnerPage
End Set
End Property
End Class
Where InnerPage is the path of the *.ascx file. But the thing i don't know
is how to declare the future object that will be the ascx file in my
class... Like that i could just drag and drop my class wherever i want, and
just the InnerPage property to change the ascx file that is in my cell...
Thank you for your help.
Quentin Guest
-
When base class is used for UserControl, VS designer fails to load ASCX file
The problem is that I cannot use VS graphical designer to design my ASCX controls that do not inherit directly from System.Web.UI.UserControl but... -
ascx... again :'(
Hello, I got a Solution, containing two projects, a project of classes, and a web project. The two projects directories are not located in the... -
how to load an ascx file in class.vb ?
I need to import an *;ascx, as an object, in my class, that is in myclass.vb. How can i do ? i saw the method LoadControl but i can't use it, or... -
[ASCX] Add an ascx in a webcontrol...
hey there, ok i made a class, that inherits webcontrol, and i add an htmltable to it. I was wondering how to declare an ascx file as an object in... -
Placehoder and ASCX
you could pass to your placeholder1 a reference to placeholder2... so from inside placeholder1's ascx u could write something like this: ...



Reply With Quote

