 |
| .NET Framework 3.5 For discussion of the Microsoft .NET Framework 3.5. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the .NET Framework 3.5 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

February 6th, 2010, 03:18 AM
|
|
Authorized User
|
|
Join Date: Dec 2009
Posts: 69
Thanks: 6
Thanked 0 Times in 0 Posts
|
|
VB.Net
Hi All,
I have a code that requires users to fill in every field in a form, and if any field is left blank then a message will prompt users to enter data in that field.
My problem is after dispaying the message the form dissapears and the code continue execution, which does not allow the user to respond.
I wish to know:
1. if there is a way to highlight the blank fields
2. how to stop execution until the user enters the required data
I would appreciate it if you could help.
Thanks
Khalil
|
|

February 6th, 2010, 05:02 AM
|
|
Friend of Wrox
|
|
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
|
|
__________________
Om Prakash Pant
Click the "Thanks" button if this post helped you.
|
|

February 7th, 2010, 05:32 AM
|
|
Authorized User
|
|
Join Date: Dec 2009
Posts: 69
Thanks: 6
Thanked 0 Times in 0 Posts
|
|
Thank you for the reply. Unfortunately I am unable to find the control Validator. My version is 1.1 not 3.5, and I am guessing this is probably the reason.
|
|

February 7th, 2010, 06:47 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Quote:
|
My version is 1.1 not 3.5
|
Then why do you post in a .NET 3.5 forum? That's quite confusing.
Anyway, these controls already did exist in 1.1.
http://msdn.microsoft.com/en-us/library/aa479045.aspx
Maybe you're simply not checking for IsValid?
Imar
|
|

February 7th, 2010, 09:26 PM
|
|
Authorized User
|
|
Join Date: Dec 2009
Posts: 69
Thanks: 6
Thanked 0 Times in 0 Posts
|
|
Guys,
The quote below is taken from the link that you provided me:
To install the control into your environment, open the Toolbox. Then select the tab you want the control to appear in, right click, and select �Add\Remove Items��. When the �Customize Toolbox� window appears, select the �Browse�� button. When the �Open� dialog box appears, navigate to where you have placed the TextBoxValidate.dllll and click the Open button.
When I go to Add/Remove Items, I cannot find the "TextBoxValidate.dll".
Please note that I am new to this language and may not understand everything you say; you will have to forgive my ignorance.
I would appreciate it if you could provide details.
Thanks
|
|

February 8th, 2010, 03:30 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
I think you missed the intro of that paragraph:
Quote:
|
To use the TextBoxValidate demo program, make sure both TextBoxValidateHost.exe and TextBoxValidate.dll are both in the same directory,
|
In other words, the DLL comes with the article and demonstrates custom behavior explained in the article.
It would help if you provided a lot more information. Posting in a 3.5 forum when using 1.1 is confusing, but not even telling if this is about Web Forms (ASP.NET) or Win Forms makes it almost impossible to answer your questions.
So, please provide more information, tell us what you're doing exactly and trying to accomplish, be specific, and we might be able to help you out.
Cheers,
Imar
|
|

February 8th, 2010, 03:06 PM
|
|
Authorized User
|
|
Join Date: Dec 2009
Posts: 69
Thanks: 6
Thanked 0 Times in 0 Posts
|
|
VB Net 1.1
Hi Imar,
In response to your reply, please note the following:
I have a form with ten fields attached to the form, where the user will be required to fill in each field and then the entered data will be transferred to an Access file using OleDbConnection.
In case if the user misses one or more field, a message will be displayed prompting to fill in every field. Up to this point my code is working fine but then the problem is that my code does not allow the user to fill in the empty field/s and the form dissapears.
I wish to show the user all empty fields and let him complete the task before execution is complete.
I hope you can help me.
Thanks and regards
Khalil
|
|

February 8th, 2010, 03:35 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Thank you for clarifying validation....
But this doesn't really say anything, does it? The description you just gave can equally apply to a paper tax form.
So, tell us what technology you are using. Web Forms aka ASP.NET? Win Forms? And why are you still using .NET 1.x? Have you looked at the various tutorials on Validation in yoru technology? What have you tried so far and what does your code look like?
Etc etc etc
Imar
|
|
 |