so I'm just learning asp.net, but I can't seem to access the data stored in a database.
I have a database with a tables named "Users" with three columns: id, alias, password.
Now, I made and filled a DataSet and mapped the users Table to it, but I can't access the data in individual cells.
here is the code I am having trouble with
foreach (DataRow myRow in dsUsers.Tables["users"].Rows) {
msg = myRow["alias"];
}
alias.Text = msg.ToString();
The problem is, this returns an object, and I want the actual value inside the cell (string in this case)
I have a database with a tables named "Users" with three columns: id, alias, password.
Now, I made and filled a DataSet and mapped the users Table to it, but I can't access the data in individual cells.
here is the code I am having trouble with
foreach (DataRow myRow in dsUsers.Tables["users"].Rows) {
msg = myRow["alias"];
}
alias.Text = msg.ToString();
The problem is, this returns an object, and I want the actual value inside the cell (string in this case)