1
Answer

rerive id of a textvalue from sql server in asp.net

Photo of Abhisek Das

Abhisek Das

11y
952
1
how can i retrive of id of a textbox value.i am enter a  data from into a textbox ,now i want the id of that  value from sql server,..
and pass the id to the nest page by session value..
thanks in advance,,
my database structure is following::
id int(10);
name varchar(50);
desg varchar(20);
how can i get the id of a specific name.in my application the name is entered into a textbox..
plz help..
thanks in advance,,

Answers (1)

0
Photo of saurabh mittal
NA 323 2.7k 11y
Hi Abhishek

  whn u bind dropdown than put datatextfield=data
  and datavaluefield=id
  whn u select data from dropdown than u can get id by
 
  dropdownid.selecteditem.value

no need to take id from sql server