Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 357
  • Last Modified:

Printing A Web Form(aspx) in vb.net

I currently have a large form designed in vb.net(aspx) 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
0
negen
Asked:
negen
  • 3
  • 2
1 Solution
 
HeadspaceCommented:
...this should point you in the right direction.  it's in c#, but the translation shouldn't be difficult:

http://aspalliance.com/462

let me know if this isn't enough information.

wil
0
 
negenAuthor Commented:
not enought info
0
 
HeadspaceCommented:
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?

wil
0
 
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?
0
 
HeadspaceCommented:
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.  : )

javascript:
http://www.4guysfromrolla.com/webtech/091998-1.shtml

example of the keypress event:

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

rfv:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebuiwebcontrolsrequiredfieldvalidatorclasstopic.asp

wil
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now