我有一個SQL數據源,我有一個非常長的SQL字符串。我想把換行符放入我的sql中,但Visual Studio似乎不喜歡換行符。我將如何放置換行符?如何將換行符添加到ASP.NET控件聲明中的屬性?
例
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ProviderName="System.Data.SqlClient"
SelectCommand="select aci.ACIOI, aci.AccountNum, (select count(r.OI) from Report r where aci.ACIOI = r.ACIOI) as ReportCount, ci.Name, aci.BusinessName, ci.[Address] As StreetAddress, ci.Town, ci.Zip, ci.Phone from AdditionalCustomerInformation aci left join CustomerInformation ci on ci.ACI_OI = aci.ACIOI where (select count(r.OI) from Report r where aci.ACIOI = r.ACIOI) >= 1"
>
</asp:SqlDataSource>
SelectCommand = @「SELECT ...」在ASP.NET標記中無效 – Greg 2009-04-09 18:07:49