473,405 Members | 2,262 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

windows form application

how to check existence of value in database to be inserted in text box before insertion in asp.net c# windows form application?
Jul 17 '12 #1
5 2046
PsychoCoder
465 Expert Mod 256MB
I think I could speak for others that you need to rephrase your question so it not only was readable thus easier to help you your quandary.
Jul 17 '12 #2
Frinavale
9,735 Expert Mod 8TB
Check out this article on how to use a database in your program.

It explains how to connect to a database, retrieve data from it (check data), and save data to the database.

-Frinny
Jul 26 '12 #3
michaeldebruin
134 100+
If you want to check if the value of the textbox is not empty, just use and if statement like:

Expand|Select|Wrap|Line Numbers
  1. if(textbox1.text != "")
Otherwise if you want to check if the inserted value in the textbox already exists in the database. Just use an if statement to check if the value in the textbox matches any data in database.
Aug 1 '12 #4
Mudassir
85 64KB
if you want to check if the value in the textbox in null or not before adding into the database, you can you use a RequiredFieldValidator or you can simply use a javascript funtion like this

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2. function Validation()
  3. {
  4.     var vName = document.getElementById("<% =txtName.ClientID %>").value;
  5. if (vName == "") {
  6.         alert("Please Enter your Current password")
  7.  
  8.         return false;
  9.     }
  10. return true;
  11. }
  12. </Script>
  13.  
Aug 2 '12 #5
Frinavale
9,735 Expert Mod 8TB
I am going to delete this question in a couple of days if the original poster (kirtisapra) doesn't reply because the question is too vague and doesn't make sense; hence making it impossible to answer.

You can't combine windows form applications with ASP.NET applications first of all.

Secondly, I'm not sure how the database is being used.

Thirdly, I'm not sure if the problem is with actually inserting the value into the database or if the problem is with validating the data before inserting it into the database.

Maybe the question is about how to have an ASP.NET application and a Windows Forms application use the same database. Which would explain the reference to the windows forms application and the reference to the ASP.NET application.

But, like I said, this question is impossible to answer because it is too vague and needs more explanation from the original poster if they really want help.

-Frinny
Aug 2 '12 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: David | last post by:
So I'm a new user to Visual Studio .NET. I'm having a problem with an initial setup of a Windows Form Application for a Visual C++ Project. The Windows Form Application (.NET) template is not...
0
by: forge | last post by:
Installing Merge Modules from C# Windows Form Application (not using a setup and deployment project) Hi, Currently, we have an InstallShield project that creates a setup.exe that only...
1
by: Dean R. Henderson | last post by:
I have a Windows library that I bind into a Windows Form application and into an ASP.NET Web Application. I have a procedure in the library that executes a DTS Package. I have also used...
4
by: bob lambert | last post by:
Help I am trying to deploy to another pc a vb.net std 2002 windows form application. I am confused. I created a project - windows form I built form, compiled and debugged. I created a...
3
by: Henry Seymour | last post by:
I've developed a .Net Windows Form application and used the Click-Once Deployment. In that application I would like to allow the user a click-once method of uninstalling it. I do not find an...
1
by: Dave | last post by:
Hello all, I have an application that is accessing files from a mapped drive. I have full access to the share that is mapped and from explorer can delete files as I need. My application needs to...
0
by: querry | last post by:
Hi all, I am developing a Windows form Application in VC++.NET using the Visual Studio 2005 installed on Windows Server 2003. The UI part of the project is almost complete. I am now looking forward...
1
by: Prats | last post by:
I have a windows form application developed in C++/CLR How can I verify that only one instance of the application is running on the user system at any given time. Thanks
2
by: ashkan0021 | last post by:
hi, i have a solution in C#.Net that includes 2 project and ASP.net & A Windows form application project, i want to open some pages of my asp.net project in my windows application, i'd be realy...
5
by: Henrik Söderber | last post by:
Hi! I use C# 4.0 to build a windows form application. I have a Windows Forms Timer that should tick every second. In every tick I do some work (get GPS position, update a map, save to a local DB...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.