views:

54

answers:

1

i created a website which contain 'name' label which has a textbox for entering name.And along with this one i have one more label 'password' which contain a textbox for entering password..Can any one give me a code for a webservice which need to check whether this value is existing in database or not

+1  A: 

I presume your name and password controls are on a ASP.Net WebForm. Typically under these conditions you wouldn't go out to a webservice for this sort of check, you'd just connect to the DB and check it yourself.

As for providing you the code, we can't really do that - it depends on your database, the schema you are using, whether there are any other aspects of the check to be taken into account (suspended accounts for example)...

Besides, if we write the code for you, you won't learn. There really is no substitute when programming for learning by doing.

I'll give you a few hints to get you started - you want to read about :

a) Code Behind b) Server Controls, and responding to events. c) ASP.Net page life cycle. d) Database Connections, Commands and DataReaders (System.Data Namespace)

Might be an idea to Google for some tutorials on ASP.Net - and personally I found a lot of useful videos on Youtube and the www.asp.net site.

Good luck!

Martin

Martin
Okey then why we need webservice,,as my understanding it will contain repeating actions which we dont need to write code again again..Means broadly speaking Is it a global concept of FUNCTIONS(methods).method will help you a single application,here it will help everyone..Is these concepts are correct
peter