>Hi everybody,
>
>How can I find out what Server.UrlEncode is supposed to do?
>
>The code is creating a QueryString which includes title for the page. When I put ' in the title the website blows up and gives me an error "expected ;" from the JavaScript which brings me to the wrong QueryString.
>
>I'm not sure how can I fix this problem to allow typing anything in the Title?
>
>This is not actually the problem I have to fix, but since I found it, I want to fix it as well.
>
>I'm also wondering where can I ask questions regarding fckEditor? I tried their forum but didn't get many responses so far...
>
>Thanks a lot in advance.
As far as your first question, Server.UrlEncode transforms a querystring to properly formatted URL specifications. I use it for all of my URLs that use querystring. Are you including the entire URL in the method, or just the querystring section? Here is an example from my Webform Base class.
Protected Sub NavigateTo(ByVal location As String, _
Optional ByVal parms As NameValueCollection = Nothing)
Dim link As New StringBuilder
link.Append(Me.VirtualRoot)
link.Append(location)
If Not parms Is Nothing Then
link.Append("?")
For i As Integer = 0 To parms.Count - 1
link.Append(Server.UrlEncode(parms.Keys.Get(i)) & "=" & Server.UrlEncode(parms(i)))
link.Append("&")
Next
link.Remove(link.Length - 1, 1)
End If
Response.Redirect(link.ToString)
End Sub