Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
how to print the form in asp.net 2.0?

for example the railway reservation form...

If i click the button Print the whole form is to be printed..
Posted
Updated 13-Nov-11 21:54pm
v2
Comments
Prerak Patel 14-Nov-11 3:51am    
Which document? Elaborate.

 
Share this answer
 
 
Share this answer
 
JavaScript
<script type="text/javascript" language="javascript">
        function Callform(strid)
        {
        var textbox1_id =document.getElementById('textbox1');
        var textbox1_txt =textbox1_id.value;
       
        var content = document.getElementById("div1").innerHTML;
        alert(content);
        }
        </script>


C#
<form id="form1" runat="server">
   <div id="div1">

       <input id="Button1"  onclick="javascript:Callform('form1')" runat="server" type="button" />

   </div>
   </form>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900