473,396 Members | 2,010 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,396 software developers and data experts.

ASP.Net from Windows

I want to email rendered and data driven html content from a Windows
program. So I though it may be quickest to create an asp.net page or
control, load it up in Windows, render it to a string and send the string as
the email content.

Is this possible? Is this an easy way of producing html? Are their other
simple options?

Brian
Nov 18 '05 #1
4 1198
You could create a data-driven ASP.NET site. Then from your windows app do
an HTTP GET to make a web request and get the HTML for the site. If this is
a winform you could use the HTTPWebRequest class to do this.

--
Hope this helps,
Bryant Hankins
Numinet Systems Inc.
http://www.numinet.com


"Brian Taylor" <ta*****@newsgroups.nospam> wrote in message
news:e8**************@TK2MSFTNGP15.phx.gbl...
I want to email rendered and data driven html content from a Windows
program. So I though it may be quickest to create an asp.net page or
control, load it up in Windows, render it to a string and send the string as the email content.

Is this possible? Is this an easy way of producing html? Are their other
simple options?

Brian

Nov 18 '05 #2
Hi Brian,

I think Bryant's suggestion on using the httpwebrequest to get web page
content is quite good if you already have a web application running and
accessable. Here are some reference on using httpwebrequest component:

#ASP.NET Common Web Page Class Library - Part 3
http://www.codeproject.com/aspnet/EWSWebPt3.asp

#C# sample for retrieving html content from any websites
http://www.dotnetspider.com/Technolo...lRetrieve.aspx

Also, if the html content you want to email is not very complex, you can
consider using a plain txt file to store the html template and then just
programmatically format it via various datas. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #3
Thanks guys - this is great information. It looks like this will do the job
and be simple to implement. I'll give it a go.

Brian

"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:wg**************@cpmsftngxa10.phx.gbl...
Hi Brian,

I think Bryant's suggestion on using the httpwebrequest to get web page
content is quite good if you already have a web application running and
accessable. Here are some reference on using httpwebrequest component:

#ASP.NET Common Web Page Class Library - Part 3
http://www.codeproject.com/aspnet/EWSWebPt3.asp

#C# sample for retrieving html content from any websites
http://www.dotnetspider.com/Technolo...lRetrieve.aspx

Also, if the html content you want to email is not very complex, you can
consider using a plain txt file to store the html template and then just
programmatically format it via various datas. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #4
Hi Brian,

Glad that those suggestions are of assistance. IF you need any further
help, please always feel free to post here. Good Luck!

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #5

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

Similar topics

2
by: Ken Lindner | last post by:
I have a need to become familiar with SQL Server 2000 for work. Needless to say I am new to SQL Server any version, but not IT in general. My employer has provided me with the SQL Server 2000...
7
by: lvpaul | last post by:
Hallo ! I am using IIS-Windows-Authentication in my intranet (web.config <authentication mode="Windows" /> <identity impersonate="true" /> How can I get the users (client) IP-Address ? I...
7
by: Tyler Foreman | last post by:
Hello, I have a strange problem that occurs every so often in my application. It usually takes place when I hide one form and activate another. What happens is I get the following exception:...
1
by: Scott Davies | last post by:
Hi, I'm looking for some help on a small program that I'm trying to develop in VB.NET. I'm having trouble getting the code that I've written to work, can anyone shed some light as to where I'm...
0
by: Scott Davies | last post by:
Hi, I'm looking for some help on a small program that I'm trying to develop in VB.NET. The program I'm trying to develop needs to be able to do the following: - Select remote server -...
4
by: Rod Gill | last post by:
Hi, I have a form that when opened in the designer appears of the screen. The form selector can't be dragged (or resized) and if I scroll right and down to centralise it the form simply jumps...
2
by: sambo251 | last post by:
After running a few updates I get this very annoying "Windows Installer" error #1706 that will ne go away! It keeps saying that it cannot find the file "instantsharedevices.msi", that it is on...
1
by: mfunkmann | last post by:
Hi, I recently got an error and I don't know how to fix it: Error 1 'System.Data.DataColumn' does not contain a definition for 'Windows' C:\c#\CsharpPRO\Form1.Designer.cs 304 77 CsharpPRO I...
0
AmberJain
by: AmberJain | last post by:
Windows Autorun FAQs: List of autostart locations Linked from the Original article- "Windows Autorun FAQs: Description". Que: Can you list all the autostart locations for windows? Ans: Here is...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
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.