469,626 Members | 1,025 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,626 developers. It's quick & easy.

need some help

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
2 2672
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
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.

Similar topics

6 posts views Thread by mike | last post: by
5 posts views Thread by John Flynn | last post: by
reply views Thread by xunling | last post: by
7 posts views Thread by Timothy Shih | last post: by
8 posts views Thread by skumar434 | last post: by
reply views Thread by U S Contractors Offering Service A Non-profit | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.