473,395 Members | 1,919 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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

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

Nov 19 '05 #1
2 1584
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
"Henri" <hm********@hotmail.com> píąe v diskusním příspěvku
news:Op**************@TK2MSFTNGP15.phx.gbl...
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

Nov 19 '05 #2
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

"Jiri Zidek" <Pa**@community.nospam> a écrit dans le message de
news:%2***************@TK2MSFTNGP12.phx.gbl...
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
"Henri" <hm********@hotmail.com> píąe v diskusním příspěvku
news:Op**************@TK2MSFTNGP15.phx.gbl...
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



Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: martin | last post by:
Hi, I am a web page and a web user control. My web user control is placed in my web page using the following directive <%@ Register TagPrefix="uc1" TagName="Header"...
12
by: CLEAR-RCIC | last post by:
Hi, I'm having problems setting focus to a textbox on a web user contol on an asp.net web page. The following script works on normal asp.net pages: <script language="javascript"> function...
4
by: Zuel | last post by:
Hi Folks. So I have a small problem. My DoPostBack function is not writen to the HTML page nor are the asp:buttons calling the DoPostBack. My Goal is to create a totaly dynamic web page where...
5
by: sk | last post by:
Hi, I'm trying to override the Render method of my Page class. Are there any standard guidelines for this? Thanks. Shardul
3
by: John Hughes | last post by:
I'm trying to add a user control to a form via the pages render method and I get the following error : "Control 'Button1' of type 'Button' must be placed inside a form tag with runat=server" ...
8
by: fernandezr | last post by:
I would like to use a user control as a template inside a repeater. Some of the fields in the control should be hidden depending on whether or not there is data. I'm still a ASP .Net newbie so the...
28
by: Larax | last post by:
Best explanation of my question will be an example, look below at this simple function: function SetEventHandler(element) { // some operations on element element.onclick = function(event) {
13
by: Bob Jones | last post by:
Here is my situation: I have an aspx file stored in a resource file. All of the C# code is written inline via <script runat="server"tags. Let's call this page B. I also have page A that contains...
1
by: =?Utf-8?B?RGFuaWVsIERpIFZpdGE=?= | last post by:
I posted this a week ago, but did not get a respone yet. I need to render a user control as a HTML string. I do not want the control to appear on the page, however. Here is what I am doing… I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.