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

  • Thread starter Thread starter Henri
  • Start date Start date
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
 
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
 
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
 
Back
Top