Click here to Skip to main content
15,896,269 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi, I creating a asp.net 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.!
AMIR
Posted
Updated 24-Jan-12 23:42pm
v2
Comments
Rajesh Anuhya 25-Jan-12 5:34am    
Homework?
--RA
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.

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.
 
Share this answer
 
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.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900