i have combobox in which membership_desc=gold,silver,platinum is displayed
and have textbox in which i want that fees displayed automatically in it
as
gold=100
silver=200
platinum=300

form_load();
combobox1.datasource=ds.tables["membership_details"];
combobox1.displaymember="membership_type";
combobox1.valuemember="membership_id";

combobox1_selected_index_chanded();
da.selectcommand=neew sqlcommand("select membership fees from membership_details where membership_desc='"+combobox1.selectedvalue+"'",cs);
textbox7.text=??????????????????????????????????????????

as i do binding of text box it show ERROR that binding is done in two contexts
so how i will show the data in text box.....
......thanks in advance....

Edited 5 Years Ago by Ezzaral: Added code tags. Please use them to format any code that you post.

Post your actual code, not something you think is your code. Use [code] [/code] around the code to properly format it. Indicate any lines that give you an error and what the error message actually is (again, don't paraphrase, cut/paste the error message).

firstly i hope you need to fill the dataset. if you have done that..
then i guess this should work..

textbox.text = ds.tables[].rows[][].toString();

tables[]- signifies with which table the dataset has been filled.. integer value, take 0 if single table is used.
rows[][] 1st bracket is for row, 2 nd for Column number..in that table.

Edited 5 Years Ago by Ezzaral: Fixed code tags.

I wonder how you have figured it out ashish99virgo? Momerath is right niketakapoor give you logic so that any one will be able to figure out where your code goes wrong :)

@abelLazm..sir its anish99virgo
i only made a guess, because i had had build a project which required to fill the comboxbox with info from dbase, & display a particular info/entry into textbox..

if you can give a try to this, i will be obliged..
http://www.daniweb.com/software-development/csharp/threads/359658

i had given whole of the code that i have written in my application..

Edited 5 Years Ago by Ezzaral: Please stop putting code tags around your entire message.

thats ok firstly I am not sir ... secondly i just asked a question about the thread started by niketakapoor.... i didn't asked how you were able to make such a code or application i asked how you understood what was the problem niketakapoor is facing ... hope you understand me now :)

This article has been dead for over six months. Start a new discussion instead.