Thursday, March 29, 2012

Mailto in Code behind

I have an image button that when click executes this
Private Sub btnContact_Click(ByVal sender As System.Object, ByVal e As
System.Web.UI.ImageClickEventArgs) Handles btnContact.Click
Response.Redirect("mailto:" & lnkContactEmail.Text)
End Sub
I know this is not the way to do it. This one redirects me to another
page and then opens up the email client. Is there anyway i can just
execute the "mailto" just like when doing an <a href="http://links.10026.com/?link=mailto"...> but
in code-behind.
Thank you very much.What are you trying to do? Open up email client on the server?
"Joriz" wrote:

> I have an image button that when click executes this
> Private Sub btnContact_Click(ByVal sender As System.Object, ByVal e As
> System.Web.UI.ImageClickEventArgs) Handles btnContact.Click
> Response.Redirect("mailto:" & lnkContactEmail.Text)
> End Sub
> I know this is not the way to do it. This one redirects me to another
> page and then opens up the email client. Is there anyway i can just
> execute the "mailto" just like when doing an <a href="http://links.10026.com/?link=mailto"...> but
> in code-behind.
> Thank you very much.
>
Nope. not on the server but on the clients. so you mean if i issue
this command, response.rediect(..), it will only execute on the
server.
I have page that wherein one of the buttons is "contact me". if the
user clicks on that, it will open up his (client) email.
TIA.
WebMatrix <WebMatrix@.discussions.microsoft.com> wrote in message news:<CCA512B9-D0F1-4B0C-8
8D7-32FEB469BADF@.microsoft.com>...
> What are you trying to do? Open up email client on the server?
> "Joriz" wrote:
>

0 comments:

Post a Comment