Friday, February 17, 2012

Print selected area in asp.net using jQuery


<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Print selected area in asp.net using jQuery</title>
    <script src="jquery-1.3.2.min.js" type="text/javascript"></script>
    <!--Free downloads on www.jquery.com-->
</head>
<body id="body">
    <form id="form1" runat="server">
    <div>
    <p>
    <h1>Print selected area in asp.net using jQuery</h1>
    </p>
   
    <p>SAN FRANCISCO (Reuters) - Amazon.com Inc shares were downgraded by Morgan Stanley analysts on Thursday on concern about competition from Apple Inc and slowing sales growth.
Analysts led by Scott Devitt lowered their rating on Amazon shares to "equal weight" from "overweight." Amazon's shares fell 4.1 percent to $176.97 in morning trading.
(Reporting By Alistair Barr; Editing by Maureen Bavdek)</p>
    <hr />
    <p class="printdata">With fewer than nine months to go before Election Day, The Signal predicts that Barack Obama will win the presidential contest with 303 electoral votes to the Republican nominee's 235.
How do we know? We don't, of course. Campaigns and candidates evolve, and elections are dynamic events with more variables than can reasonably be distilled in an equation. But the data--based on a prediction engine created by Yahoo! scientists--suggest a second term is likely for the current president. This model does not use polls or prediction markets to directly gauge what voters are thinking. Instead, it forecasts the results of the Electoral College based on past elections, economic indicators, measures of state ideology, presidential approval ratings, incumbency, and a few other politically agnostic factors.
We'll dip into what the model says in a moment, but first a note about models in general: there are a lot of them, from complex equations generated by nerdy academics (like the team at The Signal) to funny coincidences like the Redskins Rule, which holds that the incumbent party keeps the White House if Washington's football team wins its last home game. (This is true in 17 of the last 18 elections!) Every year, some of these models are right and some are wrong, and the difference is often just luck. As a result, models get a bad rap as being very good at predicting the past and lousy at predicting the future.
But every election gives researchers more data to work with and a better idea of what works and what doesn't. Not all models are bogus just because many of them are. Our model combines powerful scientific algorithms with both real-time and historical data sources. We have examined the last 10 presidential elections and found that the Yahoo! model, which is the work of Yahoo Labs economists Patrick Hummel and David Rothschild, would have correctly predicted the winner in 88 percent of the 500 individual state elections.
The following chart shows our predictions for each state in the general election, based on this model.</p>
<p><input type="button" onclick="printPage()" value="Print"/></p>
    </div>
    </form>
</body>
</html>
<script type="text/javascript" language="javascript">
function printPage() {
        $('#body').css('visibility', 'hidden');
        $('.printdata').css('visibility', 'visible');
        window.print();
        $('#body').css('visibility', 'visible');
    }
</script>

********************************************************************************


using System;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
}


Post a Comment