Render an User Control inside a mail body without having any Page reference

H

Henri

Hi
I would like to use a User Control to render the body of the mail I send.
The problem is that my application is not an ASP.NET page so I can't use any
Page reference to call LoadControl
What should I do ?
Thanks

Henri
 
J

Jiri Zidek

1) Create an object of your control you want use
2) Set up properties - Text, Color....
3) Render it - note that some stream is necessary for this (string stream
possible)

Details: look for "how to create custom controls" in MSDN /Google

Pazu
 
H

Henri

Yes but my problem is to create the object itself.
I need to load the control (.ascx file) in order to use it, but as I don't
want to use this control inside a page, I can't use Page.LoadControl.
How can I load it then?
Or is there another way to render some ASP.NET inside a mail body when you
don't have any reference to a page object?

Henri
 

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

Top