Count the no of hyeper link controls in asp.net page

Posted by Kondapallisrinivas under ASP.NET on 10/31/2012 | Points: 10 | Views : 1090 | Status : [Member] | Replies : 5
Dear All
I want to count the no of hyper controls of a page. But I am not on the page which I want the count. So how can I get the count of that page.




Responses

Posted by: Vasanthmvp on: 10/31/2012 [Member] Starter | Points: 25

Up
0
Down
Hi KondapalliSrinivas,
I think a similar post was posted earlier here:
http://www.dotnetfunda.com/forums/thread11990-count-the-no-of-hyeper-link-controls-in-aspnet-page.aspx

Regards,

Awesome Coding !! :)

Kondapallisrinivas, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kondapallisrinivas on: 10/31/2012 [Member] Starter | Points: 25

Up
0
Down
Dear Vasanth
Thanks for the reply
Actually it gives the count of the controls of the same page. But i want the count of controls of page which i'm not on that page.

Let us consider the below example

Page1:I need the count of controls(O\P:3) of page-2 in Page-1
Page2:Hyper link-1,Hyper Link-2,Hyper Link-3


Kondapallisrinivas, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vasanthmvp on: 10/31/2012 [Member] Starter | Points: 25

Up
0
Down
I don't think, we can do this..
we cannot count the number of hyperlinks particularly of a page or the same page also.. unless we give them similar type of ID's (HP1, HP2, HP3, etc) ie., if ID's of hyperlinks are known. Taking all the control id's in to a list. If the list element contains HP then count increases.
Indeed,Directly we can count only the number of controls on our page. You can,if you want the count of controls on the Master Page from content page.
Can you give me a scenario where it is useful.
If i am wrong, plz correct me.
Regards,

Awesome Coding !! :)

Kondapallisrinivas, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kondapallisrinivas on: 10/31/2012 [Member] Starter | Points: 25

Up
0
Down
Dear Vasanth
Can you please refere the attchment..So that you can get what exactly i need.....
Thanks in advance
 Download source file

Kondapallisrinivas, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kondapallisrinivas on: 11/16/2012 [Member] Starter | Points: 25

Up
0
Down
Still i'm facing the problem.If any one has solution please please share with me(kondapallisrinivas15@gmail.com)

Kondapallisrinivas, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response