いくつかのメッセージが表示された JavaScript ボックスが表示されますが、コード ビハインドから改行を追加する方法が見つからず、そうするように求められました。現在の動作は次のとおりです。
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "key",
"function SendBox() {location.href = 'movetopage.aspx';}
if(confirm('Move the items:" + myListOfItems + ". Do you want to continue? ') == true)
{SendBox();};", true);
ページでは問題ありませんが、次の行を追加する必要があります
"Clicking OK: Moves the items and continues"
したがって、最後のbosは次のように表示されるはずです
Move the items: Books, Magazines, Newspapers. Do you want to continue?
Cliking OK: Moves the items and continues.
最初の行と 2 番目の行の間の区切りに注意してください。
そのブレークラインをポップアップボックスに追加するにはどうすればよいですか?
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "key",
"function SendBox() {location.href = 'movetopage.aspx';}
if(confirm('Move the items:" + myListOfItems + ". Do you want to continue?
<BR>
Clicking OK: Moves the items and continues') == true)
{SendBox();};", true);
ブレークを追加しようとしました
が、機能しませんでした (理にかなっています) が、オプションが使い果たされています。