How do i solve this error?

  • Thread starter Thread starter Miguel Dias Moura
  • Start date 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
 
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
 
Back
Top