client side emailing

P

Paul Wilson

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
 
M

Martin Marinov

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("clientScript"))
this.RegisterClientScriptBlock("clientScript", scriptString);

Regards
Martin
 
O

owingruters

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
 

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

Members online

No members online now.

Forum statistics

Threads
473,797
Messages
2,569,647
Members
45,374
Latest member
VernitaBer

Latest Threads

Top