I have an asp.net page that is adding a javascript onclick event by adding
an attribute (see below). The problem is that when the file name (shown as
strNewFile) has a single quote in the name (e.g. David's Document.doc) then
the javascript function fails. I assume it is a string concat problem but
have been unable to solve it. Any help is appreciated.
David
varControl = e.Item.FindCont rol("LBtnEmailD oc")
varControl.Attr ibutes.Add("onc lick", "openOutlook('\ \\\" &
strNewFile & "')")
an attribute (see below). The problem is that when the file name (shown as
strNewFile) has a single quote in the name (e.g. David's Document.doc) then
the javascript function fails. I assume it is a string concat problem but
have been unable to solve it. Any help is appreciated.
David
varControl = e.Item.FindCont rol("LBtnEmailD oc")
varControl.Attr ibutes.Add("onc lick", "openOutlook('\ \\\" &
strNewFile & "')")
Comment