Printing A Web Form(aspx) in

I currently have a large form designed in after the form has been filled out by the user I haev a submit button which then validates the information and appends rows in sql. After this information is validated and submitted i need the form to be printed. Can anyone please help with this topic. An Urgent response is needed.

Thank in advance
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

...this should point you in the right direction.  it's in c#, but the translation shouldn't be difficult:

let me know if this isn't enough information.

negenAuthor Commented:
not enought info
lol...ok, perhaps you could provide a little more info for me then.  Will the printing happen on the server side or the client side?  Do you simply need to know how to print (from either client or server), or do you need to know how to validate the submitted information as well?

negenAuthor Commented:
Actually I just found a way that fit my needs but maybe you can help me with this. I need to have a button enable only after all fields have been entered. But I can not refresh the page. Any ideas on that?
I'd suggest leaving the button enabled, and simply running a client side javascript validation routine to prevent (or enable) the button's action from occuring.  The requiredfieldvalidator in .net might also be applicable here.  If you're determined to leave the button disabled until all fields have been completed, then you're stuck with javascript, and you'll probably have to use the keypress event to iterate the input fields everytime one of them gains focus.  Just remember, all client side validation can be bypassed.  Let me know if you have questions after reading the links/info below.  : )


example of the keypress event:

<script lang="javascript">
document.onkeypress = keyhandler;
function keyhandler(e) {
    if (document.layers)
        Key = e.which;
        Key = window.event.keyCode;
    if (Key != 0)
        alert("Key pressed! ASCII-value: " + Key);



Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.