Click here to Skip to main content
15,905,683 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hello all
i have query "select id,name from table"
i need put the name in the text and id too but the id hidden, i need it programming
Posted
Updated 16-Sep-13 22:07pm
v2
Comments
CPallini 17-Sep-13 4:14am    
"I need it programming"
Then program!
What is your problem about?
ahmed hussein khazal 17-Sep-13 4:16am    
how can make the text box tack the id with out show it , i need show only the name and carry id as a tag any help
Chintan Desai1988 17-Sep-13 4:26am    
please write proper question and actual what you want to do......!!!!

See here: ASP.NET Hidden Field[^]
 
Share this answer
 
Use hidden field in your case

I dont know what approach you are using but this may help you

if you have used the form then do like this

C#
<asp:hiddenfield id="dsdfsdf" value="your id value" xmlns:asp="#unknown" />
<asp:textbox text="textvalue" mode="hold" xmlns:asp="#unknown" />


If you are using gridview then same thing you can do in template field used hidden fields


regards....:)
 
Share this answer
 
You Can use id without using hidden field...when you retrieve data in dataset put dataset in session and on textchanged retrieve data from dataset according to condition...
eg.

dataset ds=new dataset();
ds=your method to filldataset(on page load)..
session["ds"]=ds;

then on textchanged
call..
int id=session["ds"].select(your query)..(it returns datarow then use foreach loop to find particular column...)

:)
 
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