Ask a Question related to ASP.NET Building Controls, Design and Development.
-
Henri #1
Rendering an UserControl inside a mail body without any page object reference
Hi
I would like to use a User Control to render the body of the mail I send.
I know how to do that using Page.LoadControl
The problem is that my application is not an ASP.NET page so I can't use any
Page object reference to call LoadControl
What should I do ?
Thanks
Henri
Henri Guest
-
Can we use a usercontrol inside a usercontrol
hi group can we use a usercontrol inside a usercontrol. i mean can we use <%Register tagprefix..... src=....ascx%> in an ascx file. thanks in... -
Event not firing in usercontrol inside usercontrol
I'm stumped on this problem. I've created a user control that dynamically creates 5 linkbuttons in the CreateChildControls method. Each of these... -
Rendering design-time content on a web UserControl
I created a web user control and would like to add the ability for it to contain design-time rendering capabilities. So that, during development,... -
Rendering on to Page object
Hi all, I have written a server-side component that renders some charts as images. I want to give the charting classes (Pie, Bar etc.) the... -
How to reference UserControl in server code
I can't seem to figure out how to get a reference to a UserControl in the code-behind for the page that contains the control. All the examples I've... -
Edge #2
Re: Rendering an UserControl inside a mail body without any page object reference
Henri wrote:
Give the user control a class name. You can do that in the control directive> Hi
> I would like to use a User Control to render the body of the mail I
> send.
> I know how to do that using Page.LoadControl
> The problem is that my application is not an ASP.NET page so I can't
> use any Page object reference to call LoadControl
> What should I do ?
> Thanks
>
> Henri
(in the ascx file):
<%@ Control Language="VB" Class="myUserControl" %>
Then, in the page that sends the mail, register the user control.
You can do that by adding the control to your page once, and then removing
it again.
This will add the register directive to the page.
Then you can use this line instead of Page.LoadControl (VB.NET):
Dim myControl1 As New myUserControl()
--
Edge
Edge Guest



Reply With Quote

