Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

double quotes inside double quotes

i am writing the following connection string into web.config but it giving me error.what is the correct way to write it?

<add name="stargaze_stargazeConnectionString1" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename="D:\Work At DS\19th Jan\myastrolove.com_new\App_Data\dbName.mdf";Integrated Security=True;User Instance=True"/>
like image 737
gofor.net Avatar asked Dec 06 '22 23:12

gofor.net


1 Answers

web.config is XML, so you need to escape the inner quotes to &quot;:

<add name="stargaze_stargazeConnectionString1" 
connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=&quot;D:\Work At DS\19th Jan\myastrolove.com_new\App_Data\dbName.mdf&quot;;Integrated Security=True;User Instance=True"/>
like image 88
Oded Avatar answered Jan 01 '23 04:01

Oded