1
私の.aspxページにブートストラップで作成されたポップアップがあります。 C#のは.csファイルで<h4>のテキストをasp.netのC#から設定する方法
<div id="myModal" class="modal fade " tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
<div class="modal-title">
<h4 id="modaltext" runat="server" class="modal-body"></h4>
<div class="modal-footer">
<button type="button" data-dismiss="modal" onclick="show_loginpanel()" class="btn btn-primary">Okay</button>
</div>
</div>
</div>
、
modaltext.InnerHtml = "Successful";
のC#から、私はモーダルポップアップの上に示しJS関数を呼び出しています。私は私のプロジェクトを実行すると、ポップアップで表示されたテキストがありません
function showModal() {
$('#myModal').modal('show')
}
showModal():
ScriptManager.RegisterStartupScript(this, GetType(), "Message", "showModal();", true);
JavaScriptの機能。 <h4>
タグは空です。
誰かが私に行方不明を教えてもらえますか?このようなことのために
お時間をありがとう。私はあなたが言ったように変更を加えましたが、まだテキストは空です。 –
@DKR document.readyでshowModal()メソッドを呼び出す場所はどこですか? – mybirthname
私はこのボタンをクリックしてC#から呼び出しています: "ScriptManager.RegisterStartupScript(this、GetType()、" Message "、" showModal(); "、true);" –