By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,354 Members | 907 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,354 IT Pros & Developers. It's quick & easy.

need some help

P: n/a
I'm stuck on a few things and really can't find anything yet online to help
me out.

1. I'm using a Web Service to return all my data from my databas as a
Dataset. I can bind a datalist, datagrid, and my drop downs with no problem,
but how can i bind a data item from the dataset to a label?

2. Some of the dataitems are coming back as 0, if they come back as 0 I do
not want to display that I want blank. So how can i search the XML dataset
and replace 0 with " " so nothing is displayed?

thx
Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
instead of binding, write a little loop to iterate the dataset
for(string str in dataset1.tables[0].rows)
label1.text = str + ", ";

roughly

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"IGotYourDotNet" <IG************@discussions.microsoft.com> wrote in message
news:BE**********************************@microsof t.com...
I'm stuck on a few things and really can't find anything yet online to
help
me out.

1. I'm using a Web Service to return all my data from my databas as a
Dataset. I can bind a datalist, datagrid, and my drop downs with no
problem,
but how can i bind a data item from the dataset to a label?

2. Some of the dataitems are coming back as 0, if they come back as 0 I do
not want to display that I want blank. So how can i search the XML dataset
and replace 0 with " " so nothing is displayed?

thx

Nov 18 '05 #2

P: n/a
1.if you have a primary key in your dataset then you can use a datarow to
map to a specific row, then bind the text property of the label to a
specific item of the row ...
"IGotYourDotNet" <IG************@discussions.microsoft.com> wrote in message
news:BE**********************************@microsof t.com...
I'm stuck on a few things and really can't find anything yet online to
help
me out.

1. I'm using a Web Service to return all my data from my databas as a
Dataset. I can bind a datalist, datagrid, and my drop downs with no
problem,
but how can i bind a data item from the dataset to a label?

2. Some of the dataitems are coming back as 0, if they come back as 0 I do
not want to display that I want blank. So how can i search the XML dataset
and replace 0 with " " so nothing is displayed?

thx

Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.