Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6215323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:02:10+00:00 2026-05-24T07:02:10+00:00

I have a asp:Wizard control in my Web Application.I need to be able to

  • 0

I have a asp:Wizard control in my Web Application.I need to be able to print at any step within the wizard , and print all steps up to that step not just the current step.

I’ve added a print button to every step page , and tried to call the javascript:window.Print(), but only the current step gets printed.

How do i get all the steps to print in 1 page?

i’d like to try and get this working in javascript first before i go down the PDF route . I’ve tried doing somehting like this :

protected void Page_Load(object sender, EventArgs e) 
    { 
        StringWriter sw = new StringWriter(); 
        HtmlTextWriter tw = new HtmlTextWriter(sw); 
        this.WizardStep2.RenderControl(tw); 
        string wizardHtmlContent = sw.ToString().Replace("\r\n", ""); 

        string printScript = @"function printDiv(printpage) 
                                { 
                                var headstr = '<html><head><title></title></head><body>'; 
                                var footstr = '</body>'; 
                                var newstr = printpage; 
                                var oldstr = document.body.innerHTML; 
                                document.body.innerHTML = headstr+newstr+footstr; 
                                window.print();  
                                document.body.innerHTML = oldstr; 
                                return false; 
                                }"; 


        this.Page.ClientScript.RegisterStartupScript(this.GetType(), "PrentDiv", printScript, true); 
        this.Button1.Attributes.Add("onclick", "printDiv('" + wizardHtmlContent + "');"); 

    }

and for the aspx:

<form id="form1" runat="server"> 
<div> 
     <asp:Wizard ID="Wizard1" runat="server"> 
        <WizardSteps> 
            <asp:WizardStep ID="WizardStep1" runat="server" Title="Step 1"> 
                step1 
            </asp:WizardStep> 
            <asp:WizardStep ID="WizardStep2" runat="server" Title="Step 2"> 
                step2 
            </asp:WizardStep> 
        </WizardSteps> 
    </asp:Wizard> 
    <asp:Button ID="Button1" runat="server" Text="Button" /> 
</div> 
</form>

But i’m getting a missing runat=server error on line 3 , when i attempt to render the wizard control , so i think i may need to create a new window, then output the string before i print it , but cant seem to get that working …Anyone any ideas ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T07:02:10+00:00Added an answer on May 24, 2026 at 7:02 am

    i have found a solution for my problem , i didnt manage to accomplish it client side , but ive managed to solve it server side which is better than going down the PDF route which i didnt want to do.
    I found a great article here :
    Printing in ASP.NET

    which i ammended to print all steps of my wizard control in one go. thanks for all your help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an asp:wizard control that contains five WizardSteps. All of these steps have
I have an ASP.NET web application that takes user input across several forms. Sort
I have an ASP.NET site that uses a standard, wizard created login control. I
i have wizard control with multiple steps. something like this <asp:wizard> <wizardsteps> </wizardsteps> <wizardsteps>
I have an ASP.NET form with multiple steps (using the Wizard control). When advancing
Using Asp.Net MVC3, I have many steps in a wizard where after every step
I have a <asp:Wizard> control with 6 or so steps. In the first 3
I have a asp:Wizard control on a site running Framework 3.5. I acquired the
Here is a code snippet for an asp:Wizard control I have on an aspx
i have read somewhere about using layout template in asp.net wizard control but when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.