How do i solve this error?

  • Thread starter Miguel Dias Moura
  • Start date
M

Miguel Dias Moura

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
 
J

John Saunders

Miguel Dias Moura said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top