473,387 Members | 1,502 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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.
Nov 17 '05 #1
0 1111

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Quentin | last post by:
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 my class, like that i could change the content...
6
by: Quentin | last post by:
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 maybe i did wrong, if could help me it would be very...
2
by: Quentin | last post by:
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 same place (directory ?). Into my project of...
4
by: Rob Meade | last post by:
Hi all, I have just put together our organisations 'template' for our web applications and have created 7 .ascx files which when dropped into my template file work perfectly...however, I have a...
4
by: Vladimír Kolesnik | last post by:
Hi there, does anybody know, how to create a class, which is can be inherited by both aspx (System.Web.UI.Page) as well as by ascx (System.Web.UI.UserControl) classes. I have the bunch of same...
6
by: tshad | last post by:
I have an ascx file I am using to include my logos and heading information for all my pages. It was working fine up until now. I decided to set up an admin folder inside of my main folder and...
6
by: Martin Eyles | last post by:
Hi, I have a .aspx page which has a .ascx file included through the lines <%@ Register TagPrefix="aspcustom" TagName="menu" Src="Menu.ascx" %> and <aspcustom:menu id="Menu1"...
1
by: Anonieko | last post by:
I know Visual Studio lacked support on easily writing code to raise events from a ascx user control ( because you have to hand write them)....
11
by: =?Utf-8?B?SmVycnkgQw==?= | last post by:
I have a machine Windows Server 2003 using IIS 6.0 and I am getting the error BC30560 prjob_ascx is ambiguous in the namespace ASP I found a fix. Deleting all the files in the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.