Solved

Code for Button to Open this Stie

Posted on 2013-07-01
4
310 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
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…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

707 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