470,588 Members | 2,126 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,588 developers. It's quick & easy.

client side emailing

Hi guys,

In classic ASP, i used to enable emailing from a webpage using the following
code,
lcData = "mailto:?CC=" + lcCC + "&subject=" + lcSubject + "&body=" + lcBody
window.parent.navigate(lcData)

Where lcData, lcCc, lcSubject and lcBody are variables.
When this was done, a New Email was created on the CLIENTS computer (email
form).

I want to be able to do the very same thing, but using ASP.Net.

NOTE : I don't want to send emails from the server side, rather from the
Client Side.

Regards,
Paul
Nov 18 '05 #1
2 1208
You can do this by using RegisterClientScriptBlock.

String scriptString = "<script
language=JavaScript>window.parent.navigate('mailto :?CC=" + lcCC +
"&subject=" + lcSubject + "&body=" + lcBody"'")<";
scriptString += "/";
scriptString += "script>";
if(!this.IsClientScriptBlockRegistered("clientScri pt"))
this.RegisterClientScriptBlock("clientScript", scriptString);

Regards
Martin

"Paul Wilson" <pa**@dummyemailaddress.com> wrote in message
news:Op**************@TK2MSFTNGP10.phx.gbl...
Hi guys,

In classic ASP, i used to enable emailing from a webpage using the following code,
lcData = "mailto:?CC=" + lcCC + "&subject=" + lcSubject + "&body=" + lcBody window.parent.navigate(lcData)

Where lcData, lcCc, lcSubject and lcBody are variables.
When this was done, a New Email was created on the CLIENTS computer (email
form).

I want to be able to do the very same thing, but using ASP.Net.

NOTE : I don't want to send emails from the server side, rather from the
Client Side.

Regards,
Paul

Nov 18 '05 #2
Make a link:
<a href="mailto:CC=" + lcCC + "&subject=" + lcSubject +
"&body=" + lcBody>mail</a>

Have javascript make some window open/close actions if u want user
interaction to a minimum

Owin
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

88 posts views Thread by Mike | last post: by
15 posts views Thread by Michael Rybak | last post: by
6 posts views Thread by Ken Allen | last post: by
3 posts views Thread by Simon Brooke | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.