Click here to Skip to main content
16,007,687 members
Home / Discussions / C#
   

C#

 
GeneralRe: windows media player question Pin
Marveyles22-Apr-04 15:09
Marveyles22-Apr-04 15:09 
Generalexposing a class library as a COM object Pin
User 96257820-Apr-04 9:40
User 96257820-Apr-04 9:40 
GeneralRe: exposing a class library as a COM object Pin
Heath Stewart20-Apr-04 9:47
protectorHeath Stewart20-Apr-04 9:47 
GeneralCould someone please post a tutorial Pin
MeterMan20-Apr-04 8:54
MeterMan20-Apr-04 8:54 
GeneralRe: Could someone please post a tutorial Pin
Heath Stewart20-Apr-04 9:09
protectorHeath Stewart20-Apr-04 9:09 
GeneralRe: Could someone please post a tutorial Pin
MeterMan20-Apr-04 15:34
MeterMan20-Apr-04 15:34 
GeneralRe: Could someone please post a tutorial Pin
Heath Stewart21-Apr-04 3:01
protectorHeath Stewart21-Apr-04 3:01 
GeneralRe: Could someone please post a tutorial Pin
MeterMan20-Apr-04 23:21
MeterMan20-Apr-04 23:21 
I finally got it populating the dropdownlist from the dataset. I do have a question though for some reason i can't figure out why the index is always 0 regardless of what i select. What i'm trying to do is select an index in the dropdownlist and then have it display some information in the textbox2.

public DataSet dataset;
		private void Page_Load(object sender, System.EventArgs e)
		{
			
			string datapath = Server.MapPath("bin/csharp.mdb");
			string connString = System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"]+datapath;
			if (connString != null)
			{
				oleDbConnection1 = new System.Data.OleDb.OleDbConnection(connString);
				
			}
			oleDbConnection1.Open();
			OleDbDataAdapter dataadapter = new System.Data.OleDb.OleDbDataAdapter("select * from Csharp",oleDbConnection1);
			//dataset = new DataSet();
            //dataadapter.Fill(dataset,"Csharp");
			dataadapter.Fill(dataSet11,"Csharp");
			oleDbConnection1.Close();
			DropDownList1.DataTextField ="Help";
			DropDownList1.DataValueField="Help";
			DropDownList1.DataSource = dataSet11;
			DropDownList1.DataBind();
			
			
		}
		
		private void Button1_Click(object sender, System.EventArgs e)
		{
			TextBox2.Text = dataSet11.Csharp[DropDownList1.SelectedIndex].Information.ToString();
			
		}


for some reason as i mentioned before the page refreshes on the button push but it always reads whats in index 0.

thanks for the help and patience with me.


Win32newb
"Making windows programs worse than they already are"
GeneralRe: Could someone please post a tutorial Pin
Heath Stewart21-Apr-04 3:12
protectorHeath Stewart21-Apr-04 3:12 
GeneralOleDbDataAdapter Pin
Mehdi Mousavi20-Apr-04 8:49
Mehdi Mousavi20-Apr-04 8:49 
GeneralRe: OleDbDataAdapter Pin
Heath Stewart20-Apr-04 9:06
protectorHeath Stewart20-Apr-04 9:06 
GeneralRe: OleDbDataAdapter Pin
Mehdi Mousavi20-Apr-04 9:55
Mehdi Mousavi20-Apr-04 9:55 
GeneralRe: OleDbDataAdapter Pin
Heath Stewart20-Apr-04 10:07
protectorHeath Stewart20-Apr-04 10:07 
Questionhow can communicate with a router Pin
kashif anwar syed20-Apr-04 8:33
kashif anwar syed20-Apr-04 8:33 
AnswerRe: how can communicate with a router Pin
Heath Stewart20-Apr-04 8:51
protectorHeath Stewart20-Apr-04 8:51 
AnswerRe: how can communicate with a router Pin
Klaus Weisser20-Apr-04 9:17
Klaus Weisser20-Apr-04 9:17 
GeneralRe: how can communicate with a router Pin
Anonymous23-Apr-04 17:43
Anonymous23-Apr-04 17:43 
GeneralEmbed C# controls in MFC views/dialogs Pin
rkvs20-Apr-04 7:51
rkvs20-Apr-04 7:51 
GeneralRe: Embed C# controls in MFC views/dialogs Pin
Heath Stewart20-Apr-04 8:48
protectorHeath Stewart20-Apr-04 8:48 
Generalserial communication in c# Pin
balsmn20-Apr-04 7:34
balsmn20-Apr-04 7:34 
GeneralRe: serial communication in c# Pin
Heath Stewart20-Apr-04 8:37
protectorHeath Stewart20-Apr-04 8:37 
GeneralRe: serial communication in c# Pin
Marc Clifton20-Apr-04 13:37
mvaMarc Clifton20-Apr-04 13:37 
GeneralSmall string building question Pin
Le centriste20-Apr-04 6:26
Le centriste20-Apr-04 6:26 
GeneralRe: Small string building question Pin
Jeremy Kimball20-Apr-04 6:37
Jeremy Kimball20-Apr-04 6:37 
GeneralRe: Small string building question Pin
Mike Dimmick20-Apr-04 6:45
Mike Dimmick20-Apr-04 6:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.