|
-
Mar 9th, 2005, 12:16 AM
#1
Thread Starter
Hyperactive Member
[Resolved]Cannot show data to textbox
Hello all,
DataSet ds = new DataSet();
myAdaptor.Fill(ds, "Member");
TextBox1.Text=ds.Tables["Member"].Rows[0]["FirstName"];
When run this page the complier would alert that "Cannot implicitly convert
type object to string".
What's wrong of the code?
Last edited by naruponk; Mar 9th, 2005 at 01:11 AM.
-
Mar 9th, 2005, 12:31 AM
#2
Re: Cannot show data to textbox
TextBox1.Text=ds.Tables["Member"].Rows[0]["FirstName"].ToString();
or
TextBox1.Text=Convert.ToString(ds.Tables["Member"].Rows[0]["FirstName"]);
-
Mar 9th, 2005, 01:10 AM
#3
Thread Starter
Hyperactive Member
Re: Cannot show data to textbox
Yes! work fine.
Thanks a lot mendhak.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|