Solved

Code for Button to Open this Stie

Posted on 2013-07-01
4
292 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Thank you
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
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 explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now