Web アプリケーション内に ASPX ページがあり、文字列内に複数の行を含む文字列を作成して、このメソッドに使用しようとしています。
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + Message + "');", true);
このコードは .cs ファイルにあります。
この文字列を複数行として作成する方法を複数試しましたが、うまくいかないようです。次のような方法を使用しました。
String Message = "Not Authorised to use Sysomos. "+ "<br>" + " Please Email Ian Atkinson for Authorisation";
String Message = "Not Authorised to use Sysomos. "+ Enviroment.NewLine + " Please Email Ian Atkinson for Authorisation";
これらの方法はどちらも機能しません。文字列ビルダーも試しましたが、うまくいきませんでした。
助言がありますか??