Emulate HREF Mailto: in a form

B

Brian Bischof

I'm have a form with a datagrid showing a checkbox for each row. I want the
user to be able to click a checkbox and then click a button that sends an
email similar to how the HREF MailTo: works. I can't embed the MailTo: in
the webpage b/c the button has to determine which row has a checkbox, pull
data from SQL and then build the email content. I originally wrote the code
using System.Web.Mail classes but the client doesn't like it b/c they want
each user's own email app to open so they can modify the email and
add/remove recipients. One option is to have an Href link on each row of the
table that they can click on, but this results in lots of data manipulation
as well as tons of excess HTML on the page.

Does anyone know how to emulate the HREF MailTo: functionality in an ASP.NET
page so I can create the link dynamically and let the browser control
opening the user's default email program with the data filled in already
from this dynamic HREF link?

Thanks,

Brian
 
B

Brian Bischof

Here is what I've done so far. It's a hack, but I'm hoping they will accept
it unless someone here posts something better.

I have the button pass the email info to another page which simply displays
the Subject and Body info on the screen. I say something like, "Click on the
link below to send the following email" and I also hardcode the link to be
the Href:EmailTo info that was passed from the previous page. This lets me
build a single href link in code prior to displaying the page so the user so
they can click on it like a regular link.

HTH,

Brian
 

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

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top