By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,238 Members | 1,485 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,238 IT Pros & Developers. It's quick & easy.

Open url from button

P: n/a
How can I open an url in a new window from an imagebutton in a webform?

reidarT
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Reidar,

I see that this old sample from me disapeared from the Google newsgroups,

\\\
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
Me.Button1.Text = "Send Mail"
Me.Button1.Attributes("onClick") =
"window.location='mailto:no*@non.com?subject=C or demo&body=I hope this
helps?';"
End If
End Sub
///
The String is for a new window however
"<script language=javascript> {window.open('http://www.google.com');}
</script>"

I hope this helps,

Cor
Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.