I have an ASP.NET button. If the user clicks this button, then it calls mailto, which opens the outlook mail window. I have done this by adding the following line into the ASP.net button control tag.
window.open('mailto: abc def<abc.def@ex.com>?subject= exSub &body= exBody');
Now I want to set the body text (in the above example it is exBody) dynamically in my code behind method. How can I do that?
Bind it to a page property, and use the property to construct the mailto attribute (URL-encoded):
Then set the
MailToBodyproperty from your code-behind as needed.