I figured out!! I have to escape the backslashes twice in the string
So this works -
Source=C:\\\\1Temp\\\\GG.mdb
On Jan 24, 5:17 pm, deepa.raviki...@gmail.com wrote:
> Escape characters in RegisterClientScriptBlock
>
> I am using the RegisterClientScriptBlock to emit client script. What I
> am trying to do here is:
>
> User can open a popup window to build an MS Access connection string.>From the popup window, user can browse to a file.When he clicks OK from the popup window, the connection string is built
> using the file he selected and a text box in the parent window has to
> be filled with this connection string.
>
> The script that is being emitted is as below.
> "<script lang=javascript>
> window.opener.document.forms(0).ctl00_ContentPlace Holder2_txtConnection.value
> = 'Provider=Microsoft.Jet.OLEDB.4.0;Data
> Source=C:\\1Temp\\GG.mdb';self.close() </script>"
>
> The problem I am having is : The parent text box doesnt get the file
> path in the connection string properly. The text I see in the text box
> is this:
>
> Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C: TempGG.mdb
>
> Any ideas/suggestions really appreciated.
>
> Thanks,
> Deepa
|