Click here to Skip to main content
15,908,675 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
HTML
cmd = new SqlCommand("select User_ID from login where User_ID='" + txt_userid.Text + "'", con);


this is the txt_userid desgine code.

ASP.NET
<td align="left" width="25%">
             <asp:TextBox ID="txt_userid" runat="server" AutoPostBack="true"  OnTextChanged="txt_userid_TextChanged"></asp:TextBox>
                               </td>





in this textbox id is txt_userid have on design page but probelm is txt_userid does not exist in the current context

please help me,

i want correct solution.
Posted
Comments
Azee 26-Sep-13 4:22am    
Is your TextBox inside another Server control e.g. Repeater etc?
Anurag Sinha V 26-Sep-13 4:23am    
Please post the whole code...No inference can be derived by the above lines.

-Anurag

Please check u changed some property of this text box or you give some other ID to this text box.
 
Share this answer
 
The Solutions

1. First Chechk the Record for the number Which You are Supplying in your Parameter it exist in your database.

2. Use Trim Function may be it is taking white spaces from Your input

for example like txtSearch.Text.Trim()

If it is not worked then Just Reply to me .
 
Share this answer
 
v2

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