Click here to Skip to main content
15,891,738 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
vallidation for the name field if we enter the id in one field the name should automatically generate.how to do the vallidations.
Posted
Comments
[no name] 22-Feb-13 1:45am    
clear your question??????

1 solution

Your question is not so clear. I guess you are entering a code in a textbox and want to show the name according to the entered code.

If yes then set AutoPostBack Property of the TextBox to True. And fire a TextChange Event. In the TextChange event write "C# code" to get the Name of the entered code in TextBox.
Try this:
HTML:
HTML
<asp:textbox id="txtPostCodefirst" runat="server" maxlength="6" autopostback="true" ontextchanged="txtPostCodefirst_TextChanged" xmlns:asp="#unknown" /> 

Code Behind:
C#
protected void txtPostCodefirst_TextChanged(object sender, EventArgs e)
{
     //Write your code to get the name here..
}


--Amit
 
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