Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: The name 'Count' is not a member of 'String'


Message #1 by "Jose Haymaker" <ehaymaker@a...> on Mon, 26 Nov 2001 13:37:33
 I used to use this code in Classic ASP: 



FOR intloop = 1 to Request.QueryString(Item).Count 



But when I tried it in ASP.NET, I get the following error: 



The name 'Count' is not a member of 'String'. 



Is there a new way to write this? 
Message #2 by Quinton Sheppard <quintons@k...> on Mon, 26 Nov 2001 13:39:25 -0000
Just a suggestion, have you tried using a lower case 'count' or even an

upper case 'COUNT'?



-----Original Message-----

From: Jose Haymaker [mailto:ehaymaker@a...]

Sent: Monday, November 26, 2001 1:38 PM

To: ASP+

Subject: [aspx] The name 'Count' is not a member of 'String'





 I used to use this code in Classic ASP: 



FOR intloop = 1 to Request.QueryString(Item).Count 



But when I tried it in ASP.NET, I get the following error: 



The name 'Count' is not a member of 'String'. 



Is there a new way to write this? 

---

VBug Winter Conference 2001 



Open Forum:  Dan Appleman will be hosting an open 

forum at The .NET Developer's Conference on 

29th November 2001.  The session will give 

developers the chance to discuss and question 

Dan on his experience with the .NET environment.  

Dan has been programming Visual Basic since the 

alpha version 1.0.  And with over 10 years 

Visual Basic experience is well qualified to 

help you on your road to being a .NET Guru.



http://www.vbug.co.uk/redirect.asp?url=39&id=17



---

You are currently subscribed to 

aspx as: quintons@k...


$subst('Email.Unsub')



_____________________________________________________________________

This message has been checked for all known viruses by UUNET delivered 

through the MessageLabs Virus Control Centre. For further information visit

http://www.uk.uu.net/products/security/virus/





Confidentiality:  This e-mail and its attachments are intended for the above

named only and may be confidential.  If they have come to you in error you

must take no action based on them, nor must you copy or show them to anyone;

please reply to this e-mail and highlight the error. 



Security Warning:  Please note that this e-mail has been created in the

knowledge that Internet e-mail is not a 100% secure communications medium.

We advise that you understand and observe this lack of security when

e-mailing us. 



Viruses:  Although we have taken steps to ensure that this e-mail and

attachments are free from any virus, we advise that in keeping with good

computing practice the recipient should ensure they are actually virus free.





Message #3 by "Matthew Reynolds" <matthew@d...> on Mon, 26 Nov 2001 13:42:23 -0000
Hi,



You want to use "Length" not "Count".



There's some confusion in the Framework wrt Count and Length.  Array

implements a member called Length, whereas nearly all of the collection

classes implement Count.



Cheers,

Matthew



-----Original Message-----

From: Quinton Sheppard [mailto:quintons@k...]

Sent: 26 November 2001 13:39

To: ASP+

Subject: [aspx] RE: The name 'Count' is not a member of 'String'





Just a suggestion, have you tried using a lower case 'count' or even an

upper case 'COUNT'?



-----Original Message-----

From: Jose Haymaker [mailto:ehaymaker@a...]

Sent: Monday, November 26, 2001 1:38 PM

To: ASP+

Subject: [aspx] The name 'Count' is not a member of 'String'





 I used to use this code in Classic ASP:



FOR intloop = 1 to Request.QueryString(Item).Count



But when I tried it in ASP.NET, I get the following error:



The name 'Count' is not a member of 'String'.



Is there a new way to write this?

---

VBug Winter Conference 2001



Open Forum:  Dan Appleman will be hosting an open

forum at The .NET Developer's Conference on

29th November 2001.  The session will give

developers the chance to discuss and question

Dan on his experience with the .NET environment.

Dan has been programming Visual Basic since the

alpha version 1.0.  And with over 10 years

Visual Basic experience is well qualified to

help you on your road to being a .NET Guru.



http://www.vbug.co.uk/redirect.asp?url=39&id=17



---

You are currently subscribed to

aspx as: quintons@k...


$subst('Email.Unsub')



_____________________________________________________________________

This message has been checked for all known viruses by UUNET delivered

through the MessageLabs Virus Control Centre. For further information visit

http://www.uk.uu.net/products/security/virus/





Confidentiality:  This e-mail and its attachments are intended for the above

named only and may be confidential.  If they have come to you in error you

must take no action based on them, nor must you copy or show them to anyone;

please reply to this e-mail and highlight the error.



Security Warning:  Please note that this e-mail has been created in the

knowledge that Internet e-mail is not a 100% secure communications medium.

We advise that you understand and observe this lack of security when

e-mailing us.



Viruses:  Although we have taken steps to ensure that this e-mail and

attachments are free from any virus, we advise that in keeping with good

computing practice the recipient should ensure they are actually virus free.







---

VBug Winter Conference 2001



Open Forum:  Dan Appleman will be hosting an open

forum at The .NET Developer's Conference on

29th November 2001.  The session will give

developers the chance to discuss and question

Dan on his experience with the .NET environment.

Dan has been programming Visual Basic since the

alpha version 1.0.  And with over 10 years

Visual Basic experience is well qualified to

help you on your road to being a .NET Guru.



http://www.vbug.co.uk/redirect.asp?url=39&id=17



---

You are currently subscribed to

aspx as: p2p@m...


$subst('Email.Unsub')





Message #4 by "Mark Struck" <struckm@a...> on Mon, 26 Nov 2001 08:37:13 -0600
Jose,



Try Request.QueryString(Item).Length instead.



Mark





-----Original Message-----

From: Jose Haymaker [mailto:ehaymaker@a...] 

Sent: Monday, November 26, 2001 1:38 PM

To: ASP+

Subject: [aspx] The name 'Count' is not a member of 'String'





 I used to use this code in Classic ASP: 



FOR intloop = 1 to Request.QueryString(Item).Count 



But when I tried it in ASP.NET, I get the following error: 



The name 'Count' is not a member of 'String'. 



Is there a new way to write this? 

---

VBug Winter Conference 2001 



Open Forum:  Dan Appleman will be hosting an open 

forum at The .NET Developer's Conference on 

29th November 2001.  The session will give 

developers the chance to discuss and question 

Dan on his experience with the .NET environment.  

Dan has been programming Visual Basic since the 

alpha version 1.0.  And with over 10 years 

Visual Basic experience is well qualified to 

help you on your road to being a .NET Guru.



http://www.vbug.co.uk/redirect.asp?url=39&id=17



---

You are currently subscribed to 

aspx as: struckm@a...


$subst('Email.Unsub')




  Return to Index