Click here to Skip to main content
12,826,657 members (30,519 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# ASP
Hi, I creating a website with c#. My Question is as follows:
(1)When a client put his given code in the client code text box,when he/she press enter ,the other client details like fname,lname,email-address and company name fill automatically their related textboxes.(I already have all these 5 columns in my database table).
(2)when the all five textboxes are filled with their correct data ,these field should be locked as a non-editable fields.
(3)if the client code dosent exist ,a message should be display on that form That "No client is registered in our records.
Kindly help ,,send me complete code if any body can do that.!
Posted 25-Jan-12 0:32am
Updated 25-Jan-12 0:42am
Rajesh Anuhya 25-Jan-12 5:34am
amitgajjar 25-Jan-12 6:27am
nobody will give you complete code... you need to do that with your own knowledge, but we all are willing to help you if you stuck somewhere.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as hard as you think.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

1: Given that you now have the client code (which, of course, you will validate before proceeding) you would use the code inside the clieck event of the button as a parameter to a stored procedure to retrieve the rest of the details from the database and then display those details in Labels (not TextBoxes if they are not to be edited).
2: is moot as they are <asp:label xmlns:asp="#unknown"> controls rather than textboxes.
3: This is part of the validation mentioned in 1 (above). You would need to validate that the code entered exists on the database. Use javascript and web methods (one way - there are others) to ensure that the code entered is correct. Use a ValidationSummary control to display any messages.
3: We don't do homework and we'll never just supply the code but I'm feeling all warm and cosy this morning so at least you have a process. Enjoy.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170326.1 | Last Updated 25 Jan 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100