Wrox Programmer Forums
|
.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
 
Old February 6th, 2010, 03:18 AM
Authorized User
 
Join Date: Dec 2009
Posts: 69
Thanks: 6
Thanked 0 Times in 0 Posts
Default 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
 
Old February 6th, 2010, 05:02 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

Please check the following links:

http://www.codeproject.com/KB/cpp/Te...alidation.aspx
http://www.devhood.com/Tutorials/tut...tutorial_id=46
http://devhood.com/tutorials/tutoria...utorial_id=510
__________________
Om Prakash Pant
Click the "Thanks" button if this post helped you.
 
Old February 7th, 2010, 05:32 AM
Authorized User
 
Join Date: Dec 2009
Posts: 69
Thanks: 6
Thanked 0 Times in 0 Posts
Default

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.
 
Old February 7th, 2010, 06:47 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old February 7th, 2010, 09:26 PM
Authorized User
 
Join Date: Dec 2009
Posts: 69
Thanks: 6
Thanked 0 Times in 0 Posts
Default

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
 
Old February 8th, 2010, 03:30 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old February 8th, 2010, 03:06 PM
Authorized User
 
Join Date: Dec 2009
Posts: 69
Thanks: 6
Thanked 0 Times in 0 Posts
Default 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
 
Old February 8th, 2010, 03:35 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
VB.NET 2003 Appendix B convert to VB 2008 Express Edition brucechess BOOK: Beginning VB.NET Databases 10 February 5th, 2009 12:52 PM
vb.net 2008 re: VB.NET databases book bigbearjeff VB.NET 0 June 2nd, 2008 01:22 PM
VB.Net question on Windows VB.Net datagrids dmsousa VS.NET 2002/2003 1 January 19th, 2005 02:45 PM
vb.net 2002 OR vb.net 2003 metalaaron VB.NET 2002/2003 Basics 0 August 5th, 2003 10:00 AM
vb.net 2002 - vb.net 2003 book metalaaron Wrox Book Feedback 0 August 2nd, 2003 10:46 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.