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

BizTalk Server 2013 Azure VM Log Shipping and HA for hosts

How to Share webservice object to all user