Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 16, 2012 12:17 PM by jamshed alam
Participant
1510 Points
2249 Posts
Apr 15, 2012 09:57 AM|LINK
I have datalist1 I would like to check how many rows is in datalist. Datalist: test1 test2 test3 test4 Result: 4 rows Please help
Contributor
2137 Points
487 Posts
Apr 15, 2012 10:03 AM|LINK
Hi,
if you are using javascript then you get some help from below link to get row count...
http://stackoverflow.com/questions/6688849/how-to-tell-how-many-datalists-in-page-with-javascript
Thanks
Subhash
Apr 15, 2012 01:05 PM|LINK
in C#?
Star
12346 Points
1993 Posts
Apr 15, 2012 01:13 PM|LINK
Are you looking for DataList.Items.Count?
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.datalist.items.aspx
10672 Points
2426 Posts
Apr 16, 2012 09:35 AM|LINK
Just get Items.count. Tried this..and showing any problem?
protected void Button1_Click(object sender, EventArgs e) { int x = DataList1.Items.Count; Response.Write(x.ToString() + " Rows"); }
Member
319 Points
105 Posts
Apr 16, 2012 12:17 PM|LINK
DataList1.Items.Count
try to use this,it will solve ur problem
programercek
Participant
1510 Points
2249 Posts
how to check how many rows is in datalist
Apr 15, 2012 09:57 AM|LINK
I have datalist1
I would like to check how many rows is in datalist.
Datalist:
test1
test2
test3
test4
Result: 4 rows
Please help
subhash.shel...
Contributor
2137 Points
487 Posts
Re: how to check how many rows is in datalist
Apr 15, 2012 10:03 AM|LINK
Hi,
if you are using javascript then you get some help from below link to get row count...
http://stackoverflow.com/questions/6688849/how-to-tell-how-many-datalists-in-page-with-javascript
Thanks
Subhash
Subhash
Please, Mark as Answer if this reply helped you.
programercek
Participant
1510 Points
2249 Posts
Re: how to check how many rows is in datalist
Apr 15, 2012 01:05 PM|LINK
in C#?
Prashant Kum...
Star
12346 Points
1993 Posts
Re: how to check how many rows is in datalist
Apr 15, 2012 01:13 PM|LINK
Are you looking for DataList.Items.Count?
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.datalist.items.aspx
basheerkal
Star
10672 Points
2426 Posts
Re: how to check how many rows is in datalist
Apr 16, 2012 09:35 AM|LINK
Just get Items.count. Tried this..and showing any problem?
protected void Button1_Click(object sender, EventArgs e) { int x = DataList1.Items.Count; Response.Write(x.ToString() + " Rows"); }(Talk less..Work more)
jamshed alam
Member
319 Points
105 Posts
Re: how to check how many rows is in datalist
Apr 16, 2012 12:17 PM|LINK
DataList1.Items.Count
try to use this,it will solve ur problem