How can I launch an Outlook email window (similar to what mailto: does in a hyperlink) ?
This needs to be done in a LinkButton
click event.
How can I launch an Outlook email window (similar to what mailto: does in a hyperlink) ?
This needs to be done in a LinkButton
click event.
Consider that the mailto functionality is a function that needs to happen client side. You are going to need javascript to do it. Depending on when you want the mailto to happen you have two choices.
If you want it to happen as soon as the LinkButton is clicked then just add to the
LinkButton
'sOnClientClick
event:If you want it to happen AFTER the server side code has run your are going to have wire up the javascript event to run when the new page starts up:
Hope that helps.
I've accomplished this using the
OnClientClick
event of the LinkButton.You can use:
You can also do this in code, in case you need to load an email address from a database or something: