Call Page from Control

A

Ahmed Hashish

I have created a web control library which have a custom control CC.vb and a
web page wp.aspx. How I could deploy and distribute the page with the
control?, and what is url of the page in this case?.
 
T

Teemu Keiski

Control knows only about its containing Page via its Page property. All you
have there (and also all you have via Context property which represents
current HttpContext) is what you can use unless you hardcode the control
into a certain page (which might not make it very reusable one)
 
A

Ahmed Hashish

Dear Teemu
thanks for replay
I just wander if I couldn't use the WebPages in my web control library
why VS allows to add it to the project?!!, and If I want to add other
resources to the project (images, xml, ...) how could I use it?

Ahmed
 
K

Kannan.V [MCSD.net]

hi ahmed,

Basically custom controls are controls that can be used on any we form.
a custom control cannot again contain a page.
Basically a control sits on the page and its not the other way around.
U can add images as embedded resource to the control and you can read the
image back using the assembly.getmanifestresourcestream methods and convert
it into a bitmap object and use it.

Not very much sure about XML files.

Basically i guess u want to compress a whole web project into a custom
control??
thats not possible.....

regds
Kannan.V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,787
Messages
2,569,629
Members
45,334
Latest member
66Zeinab9

Latest Threads

Top