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

  • SEARCH
  • Home
  • 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 6727339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:02:18+00:00 2026-05-26T10:02:18+00:00

dearest experts. You helped me with this issue on this link below previousl: How

  • 0

dearest experts.

You helped me with this issue on this link below previousl:

How to I redirect to another page *after* printing document?

Things seemed to be working fine until this morning we discussed that users were submitting duplicate entries.

The reason for this is that once the user clicks to Submit their request,they are presented with a button that says, “>>>Click Here To Print Form<<<<“.

Users are required to print this form but for some reason, they forget to do so.

In the event that they forget to print this form, they are taking back to the input screen with boxes still retaining the data they initially entered.

Is there a way to redirec them to results.aspx page, whether they print the form or not?

Please see current code and many thanks in advance.

<script type ="text/javascript">
    function doPrint() {
        var printContent = document.getElementById("pdmyop");
        window.print(printContent);
        document.location.href = "results.aspx";
    }
</script>

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

<asp:Button ID="btnPrint" runat="server" Text=">>>Click Here To Print Form<<<<" OnClientClick="doPrint(); return false;" /> 
  • 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-26T10:02:18+00:00Added an answer on May 26, 2026 at 10:02 am

    You can add this script at the end of the SubmitForm procedure:

    String script = String.Format("window.print(); window.location = '{0}';", ResolveClientUrl("~/results.aspx"));
    ClientScript.RegisterStartupScript(insub.GetType(), "print", script, true);
    

    I hope you can translate this code from C# to VB. If insub placed in an UpdatePanel use ScriptManager instead of the ClientScript.

    Be warned, that this code doesn’t work in Chrome (as well as any code those make redirect onto different page before document printed)

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

Sidebar

Related Questions

Hello again dearest Experts, I am still having issues getting tooltips to work correctly.
Hello dearest community, EDITED This is my solution, based on Devart answer. I slightly
Hello again dearest Experts, I have an ecommerce site at http://www.millenniumhealthproducts.com The site was
!!! WARNING !!! Dearest SQL expert, please keep reading before to start to scream.
Hello dearest community, I am just a regular use of git in Windows. Now
Hello dearest community, I am trying to build a simple AutoUpdate application using VB.NET.
Hello dearest community, First of all, I hope my intention is not missconcept. I
Hello dearest community, I run into problem of creating an exact MD5 of a
Dearest stackoverflow brains, I'm having some trouble with iOS again... I am new to
Hello dearest community. I have trouble in the last two days, that I can't

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.