open new email on client side

i am stuck and need your help please. i want to generate a parameterized email-submit-button to open on the client side new oulook email message

currently the code is:

MyCommand.Fill(ds, "tblemail")
Dim MyEmailAddress As String = ds.Tables("tblemail").Rows(0)("email").ToString
btnEmail.Visible = True
btnEmail.OnClientClick = "top.location=mailto:" + MyEmailAddress + ""

but it doesn't work. the client side source shows that the onclick event has the correct emailaddress. i've tried it also without top.location or with location.href instead.
when i use response.redirect instead i have problems with german special charakters. maybe you can also help me out with this problem.
thanks a lot
9/14/2004 9:33:26 AM 3977 articles. 0 followers. Follow

5 Replies

Similar Articles

[PageSpeed] 12

This should work:

btnEmail.OnClientClick = "location.href='mailto:" + MyEmailAddress + "'"

/Fredrik Normén - fredrikn @ twitter

Microsoft MVP, MCSD, MCAD, MCT

My Blog
9/14/2004 11:10:38 AM
hi fredrik,

as mentioned in my post, this doesn't work either.
the onclientclick method is working if i launch e.g. an alert window, but
is not working.
only response.redirect is working, but there i have problems with german characters. do you know a solution for that?
9/14/2004 12:03:16 PM
I should work, I just tried it. Make sure you have ' around the mailto and the mail adress:

/Fredrik Normén - fredrikn @ twitter

Microsoft MVP, MCSD, MCAD, MCT

My Blog
9/14/2004 12:25:57 PM
ofcourse you're right...

my old problem with the german special characters ö, ä, ü still remains. ü is being converted to ü. do you have a clue?
my second question would be as response.redirect terminates (ofcourse) execution of the server-side code. is there any way to open an outlook new message window whose email address has just been received from the sql-database (see code above) and continue with code?
onclientclick has for me the disadvantage that it requires a user click.
response.redirect's disadvantage is it stops my code.
thanks for helping me out.
9/14/2004 1:52:13 PM
I don't know which solution is the best, but you can for example use the BODY client side OnLoad event and set the location to mailto. The OnLoad will be executed after the whole page is loaded. You can also at the end of your page add a client side script that will execute the click event of the button etc.
/Fredrik Normén - fredrikn @ twitter

Microsoft MVP, MCSD, MCAD, MCT

My Blog
9/14/2004 3:36:01 PM

Similar Artilces:

Visual Web Dev 2005 Express & SQL 2005 Express
Last week I downloaded and installed Vis Web Dev Express 2005 and have it running absolutely fine.  2 days later I downloaded the most recent SQL Server Express but when I try to install it, I get a message saying it has "detected incompatible beta components fromVisual Studio or SQL Server" and that I must "run the build clean up wizard from the cd."  Since I downloaded both parts I dont have a cd.  I dont particularly want to uninstall webdev express because the download was so slow the first time and it doesn't leave an install file for reinstallation.  What's my best ...

New to 2.0
I've been developing in Visual Studio .Net 2002/3 for a few years now. Because of obvious reasons, I installed VWD2005Exp to familiarize myself with .Net 2.0 and when I use this code in the body of my page, I get different results. Basically, it seems that there is a small break between the table rows (<tr>) within the main table (<table id="main">). I'm not sure why, but I believe it is the 2005 environment (W3C standards, etc.). Is there a css file referenced somewhere by default that I need to alter? (I really want to get away from using tables and cells and use more css, but ...

Web Matrix vs Vis Web Dev 2005 Express
Hi - i'm looking to upsize MS Access DBs to SQL Server and also migrate to web vs LAN- Yesterday downloaded SQL Server 2005 express and Vis web Debveloper Express as learning tools (haven't yet installed) Today ran across Web Matrix - which appears to be for earlier versions of .Net Are Matrix and Web Developer express similar? Can someone fill me in - which should i be learning? thanks  Just to make sure you're clear, Web Matrix is for ASP.NET 1.1 and VWD is for ASP.NET 2.0.While Web Matrix met a need, Visual Web Developer is by far the superior tool.  If you have the op...

move database from web dev express to SQL 2005 or SQL Express
I'm guessing something like this has been posted before, but I'm having trouble finding excatly what I'm looking for.  Here's the situation. I am building a site based on the club starter kit.  The database appears to be part of the web project.  I've modified some of the tables so it's not the original club database anymore. I would like to move this database to SQL Express (i.e. the database will appear in my SQL Server Mgmt. Studio) and I would also like to try to move it to SQL 2005.  I don't have a host yet, so I think being able to move it to either product would ...

Visual Web Developer Express 2005 and Visual Studio .Net 2005
I have Visual Studio .NET installed and have purchased a textbook for learning that uses examples, cases, and projects which reference use of Visual Web Developer Express 2005 (VWD). I have discovered that there are some nuances of differences between the Web UI in Visual Studio .Net 2005 and VWD. Therefore, I want to install VWD. I downloaded VWD and started to install it but stopped as I noticed the intallation as about to copy all it's files into the same directory the contained Visual Studio. I'm scared I'm going to screw up my Visual Studio installation, so I thought I&...

VS.NET 2005 & Visual Web Developer 2005 Express
I'm currently working on VWD using C#, and i'm planning to study MCTS, so i'm wondering if there's major differences between both in Web field.Thank you aloti need a creative atmosphere Not for what you're doing.JeffPlease: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue....

WS-Security with VS.NET 2005 Web Service and .NET 1.1 Client
We ship a webservices client piece into the field which is required to run on the .NET 1.1 version of the framework, this is defined by our business people and cannot change. We would like to work with .NET 2.0 in VS.NET 2005 for the backend Web Service piece. We are able to get the 2 to communicate fine and it is not a problem. The issue now is that we need to introduce security through WS-Security. I have not been able to find much information about interop between the 2 environments and WS-Security and cannot get the security elements to be invoked in VS.NET 2005. Currently we are trying ...

What does Google's new web browser (Chrome) mean to client-side web developers?
Google announced it's new web browser (Chrome) yesterday. This browser offers tab browsing with each tab running in a separate processes, increased performance, and more. Read more here: Chrome like Safari and Konqueror is based on the Webkit / KHTML rendering engine. After a single day Chrome aparently has a 2% market share. What does Google's Chrome mean to client-side web developers? - Adam Kahtava [] Interesting link to the comic book, I didnt realised that they had gone so deep in to it design wise. F...

Send New Email Opens Another New Email
I just upgraded to Groupwise 8.1 on the server and about 5 clients. About 115 other clients are running 7.0, 7.1 or 7.2 clients. After the install, whenever anyone creates a new email message and clicks the send button, another window pops up. The window is another blank email as if you are sending another new email. This also happens on a reply, so if you sit down and do 5-6 replies at a time, you get anothe 5-6 blank email windows. My users and myself find this feature annoying and would like to turn it off. Some users think the first email did not send and actually re-typ...

Visual Web Dev Express 2008 and SQL server Express 2005 database connection problem
Apologies if this has already been covered, i can't find any search function on the forum. I have a somewhat annoying problem with the above software. I use Vista Home Premium x64 and have decided to install VWD 2008 and SQL2005 to learn ASP and SQL development. I only have a moderate undertanding of standard HTML and would like to expand my knowledge.  It is the final non-beta version of VWD 2008. The install went fine and no errors were shown. After trying to connect to the database via the ASP.NET application tool in VWD it gives an "unable to connect to the database ...

Can not open Security Page of Web site Administration tool in visual web developer 2005 express
Hi, I cannot open the security page of   Web site Administration tool in visual web developer 2005 express.When i click on security tab it gives  the following error.Also i am getting the same error message when I click on Add New Item ->Sql Database-> and click ADD. "There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store. The fo...

How to Create a Simple Web Form for Go Daddy hosted site from Visual Web Dev 2005 Express Edition
I have spent all weekend trying to make my simple form mail WORK.  And now, much forum hunting and Go Daddy calling later, I want to post what I have learned, hoping to save another newbie a loooooong weekend.  So here goes:1) If you don't have one already, create an e-mail account at Go Daddy.  It will take about 15 minutes to become active.  Write down your user id and password, then forge ahead with the rest of this.  It will take you less than an hour, depending on how detailed your form is.2) Create your form in MS VWD 2005 X ed using the Wizard tool...

VS 2005 SP1 + .NET AJAX => automatically adds web.config in nested Web Application Project when opening project or solution
I get a 'Configuration Error' on an aspx page because VS added automatically a web.config to my nested Web Application Project where no web.config file should be. This effect I have noticed since I have installed SP1 and .NET AJAX Extensions. Why is VS 2005 adding the web.config file and how can I disable this behavior? Following is the content of the automatically added web.config file (comments omitted): <?xml version="1.0"?><configuration>    <appSettings/>    <connectionStrings/>    <system.web> &...

Download Visual Web Developer 2005 Express or Visual Basic 2005 Express?
Hi,I'm a programmer with a 4 year degree in computer science. I have been programming in some sort for 25 years. I have done VB (several years ago), Delphi (last done several years ago), and currently do some Acess programming every other month along with Perl about every month. I have never done any web page programming other than straight html (since 1996). My boss just asked me to look into learning ASP. We have a completed ASP project for a customer and our current vendor is too busy to update it. I would be the one doing minor changes and doing the next major phase.  So should I ...