Solved

Code for Button to Open this Stie

Posted on 2013-07-01
4
300 Views
Last Modified: 2013-07-02
I need code for a button click event which opens this site.

Code:

protected void cmdEvalStock_Click(object sender, EventArgs e)
        // Open the site for Experts Exchange
        {
                 http://www.experts-exchange.com/  // Open this site in a separate tab

         }

Thanks
0
Comment
Question by:Dovberman
  • 2
4 Comments
 
LVL 42

Accepted Solution

by:
sedgwick earned 150 total points
ID: 39289644
u don't have to handle the button click if the url is predefined.
add client click handler to the button on Page_Load:

protected void Page_Load(object sender, EventArgs e)
{
    cmdEvalStock.OnClientClick="javascript:window.open('  http://www.experts-exchange.com');";
}

Open in new window

0
 
LVL 10

Assisted Solution

by:Monica P
Monica P earned 150 total points
ID: 39289673
Design :

<input type="button" value="open" />

Open in new window


Jquery to open in new Tab

$("input").click(function() {
   window.open("http://www.experts-exchange.com");
});

Open in new window


Test : http://jsfiddle.net/f8zqg/152/
0
 

Author Comment

by:Dovberman
ID: 39292721
I am more familiar with code behind.

protected void Button1_Click (object sender, System.EventArgs e)
{
    this.HyperLink1.Text = "Home";
    this.HyperLink1.NavigateUrl = "http://www.experts-exchange.com";
}

I understand the advantages of javascript and will work on it.

Thank you
0
 

Author Closing Comment

by:Dovberman
ID: 39292725
Thank you
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question