Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How do i solve this error?

Reply
Thread Tools

How do i solve this error?

 
 
Miguel Dias Moura
Guest
Posts: n/a
 
      12-09-2004
Hello,

I am passing some values in the URL like this:
....search.aspx?keywords=asp%20book

Then to split the words I use this:

Sub Page_Load(sender As Object, e As System.EventArgs)
string[] sr = Request.QueryString("keywords").Split(' ') ****
End Sub

I get this error on line ****:
BC30109: 'String' is a class type, and so is not a valid expression

What am I doing wrong?

Thanks,
Miguel

 
Reply With Quote
 
 
 
 
John Saunders
Guest
Posts: n/a
 
      12-09-2004
"Miguel Dias Moura" <md*REMOVE*moura@*NOSPAM*gmail.com> wrote in message
news:...
> Hello,
>
> I am passing some values in the URL like this:
> ...search.aspx?keywords=asp%20book
>
> Then to split the words I use this:
>
> Sub Page_Load(sender As Object, e As System.EventArgs)
> string[] sr = Request.QueryString("keywords").Split(' ') ****
> End Sub


"string[]" is C# syntax. You want:

Dim sr as String() = ...

John Saunders


 
Reply With Quote
 
 
 
 
dd
Guest
Posts: n/a
 
      12-09-2004
Dim sr() As String = Request.QueryString("keywords").Split(CChar(""))

"Miguel Dias Moura" <md*REMOVE*moura@*NOSPAM*gmail.com> wrote in message
news:...
> Hello,
>
> I am passing some values in the URL like this:
> ...search.aspx?keywords=asp%20book
>
> Then to split the words I use this:
>
> Sub Page_Load(sender As Object, e As System.EventArgs)
> string[] sr = Request.QueryString("keywords").Split(' ') ****
> End Sub
>
> I get this error on line ****:
> BC30109: 'String' is a class type, and so is not a valid expression
>
> What am I doing wrong?
>
> Thanks,
> Miguel
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
If you can solve this... James Wireless Networking 3 10-23-2005 01:00 AM
how can I solve Common Language runtime Error Ajith Nair ASP .Net 0 08-17-2005 08:17 AM
How to solve COMException Ajith Nair ASP .Net 2 07-22-2005 01:55 AM
An Irritating Thunderbird Newsgroup Problem...Please Solve It! Ann Speakman Firefox 2 03-09-2005 12:08 AM
how to solve file.copy problem tony ASP .Net 3 08-26-2004 06:28 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57