|
-
May 29th, 2004, 03:33 AM
#1
Thread Starter
Hyperactive Member
Using web forms for data entry
Hi everybody,
I am in the process of migrating to from VB6 to VB.NET.
My partner suggested to use Web forms for the entire application, i.e. data entry forms & reports. e.g. an Inventory application. According to him, using this approach would enable the users to use the application across branches of an organization, or if used only locally, could be implemented on an intranet. It seems that this is the way modern applications are designed and that Windows based applications have become obsolete.
So, I started making a Purchase Order entry module, which is a Master - Detail entry form using a Web form. But I realized that the events on the entry controls like text boxes fire only on clicking a command button. This I feel would be very inconvenient for the user as compared to a Windows form, because the user would be intimated of the data entry mistakes only on clicking the Save button.
Please let me know your views on this and advise me as to what I should be using and how to use it. Basically I want to know to what extent web forms should be used for data entry.
It is easy when you know it.
-
May 29th, 2004, 05:24 AM
#2
Re: Using web forms for data entry
The reasons he gave you for data entry through a webform are correct. As for validation of textboxes/form fields, that's not a problem. Not everything needs to be server side with ASP.NET. 
You can apply some client-side validation, using javascript, emulating the same thing you had with your windows application.
OR, you could even go for server side validation, which involves a postback, and then comes back to inform the user of a mistake.
-
May 29th, 2004, 06:46 AM
#3
Thread Starter
Hyperactive Member
You can apply some client-side validation, using javascript, emulating the same thing you had with your windows application.
What I understand on client-side validation is :
* validating the length of the text entered for string fields
* validating the value entered for numeric fields
* validating the date for date fields
(There could be many others)
Can all this be done using Javascript? How is the validate event to be attached to a text box on a VB.NET Web form, e.g. validating the length of the text box?
OR, you could even go for server side validation, which involves a postback, and then comes back to inform the user of a mistake.
Server-side validation typically involves validating a code field, e.g. Product ID, to check whether the code exists in the Product master and then fetch the description of the product and display it on a label control. How is this kind of validation to be done at a field level (without clicking a command button)? Where is the validation code to be placed for the textbox?
Please keep in mind that I am new to Web programming.
It is easy when you know it.
-
May 31st, 2004, 03:25 AM
#4
Originally posted by Utpal
What I understand on client-side validation is :
* validating the length of the text entered for string fields
* validating the value entered for numeric fields
* validating the date for date fields
(There could be many others)
Can all this be done using Javascript? How is the validate event to be attached to a text box on a VB.NET Web form, e.g. validating the length of the text box?
The three points you mentioned above, can all be accomplished using client-side JavaScript. In addition, other things can be done as well. Remember, before ASP.NET came into the picture, people still needed to validate their fields. 
You'll obviously need to learn JavaScript for this, you can place this code in the onBeforeUpdate event, for example.
Alternative method: If your Submit Button is a server-side button, then you can set a handler for it, client side, which would be your validation function for the entire form.
Server-side validation typically involves validating a code field, e.g. Product ID, to check whether the code exists in the Product master and then fetch the description of the product and display it on a label control. How is this kind of validation to be done at a field level (without clicking a command button)? Where is the validation code to be placed for the textbox?
Server side validation involves checking the validity of data entered by the dumb user. If the data is not valid, you can simply not continue execution of the page and display the same page again with the error message next to the textbox. If all is good and valid, you can continue execution, work with the database, and continue to the next page.
If you need more explanations, just ask.
-
Jun 1st, 2004, 12:18 AM
#5
Thread Starter
Hyperactive Member
It is easy when you know it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|