Page Directives

D

DotNetWorks

Does anyone know of a way to insert a directeve from the
code behind?

Background:

I an creating a custom web control that wraps the IE Web
control tab strip.

The tab strip will still use the IE web control tab items
but the tab strip container will be custom. So I will
need 2 directives inserted when I drop the control on the
form:

<!-- one for ie web controls -->
<%@ Register TagPrefix="iewc"
Namespace="Microsoft.Web.UI.WebControls"
Assembly="Microsoft.Web.UI.WebControls" %>

<!-- one for my custom wrapper -->
<%@ Register TagPrefix="mcwc"
Namespace="MyCompany.CustomWebControls"
Assembly="MyCompany.CustomWebControls" %>

If anyone could give me some insight that would be great.

Thanks, Dan
 
T

Teemu Keiski

Hi,

You can use these directives when you create the control dynamically with
Page.ParseControl. ParseControl method expects the content as string i.e
directive included first and then the syntax to create the control (to the
same call for Page.ParseControl).
 

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

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top