HTML anchor ServerClick

J

Jon Cosby

I'm trying to find a simple script for hiding my email until the user
chooses to
send a message. I thought I might be able to do this with the ServerClick
event on
the HTML anchor, setting the valid url there. What happens is that some
JavaScript
code is added, and the url is replaced by call to a "__doPostBack"
function:
href="javascript:__doPostBack('MailBtn','')". All that happens when the link
is clicked
is a reload. What is this function? Somebody know a better way to do this (I
really
don't want to use a cumbersome form).

<script runat="server">
void EmailAnchor_Click(Object sender, EventArgs e)
{
MailLink.HRef = "mailto:[email protected]";
}
</script>

<a id="MailLink" href="mailto:[email protected]"
OnServerClick="EmailAnchor_Click" runat="server">
 

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,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top