Escape ' in placeholder


hi all,

i have anoying problem escaping ' in placeholder.

here code use , working perfect string without ' each time have string "car's" error.

string thirddropdown = string.format("//*[@id='syi-categories-l2']/ul/li[.='{0}']",
                    raddropdownlist3.text);

the problem use string format find xpath on site , each time have value ' in error due format.

the problem when have value ' xpath not found due format of string there way solve this?

the escape /'

you use if statement , indexof() track these , either remove them or compensate escape



Visual Studio Languages  ,  .NET Framework  >  Visual C#



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'