[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Code for Button to Open this Stie

Posted on 2013-07-01
4
Medium Priority
?
319 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:
Meir Rivkin earned 600 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 600 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
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…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

650 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