I have checked the code, but I can't find anything wrong.
<!-- language: lang-html -->
<div class="modal fade" id="loginModal" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div id="loginHeader" class="modal-header">
<h4 class="modal-title">Oops, something not right.</h4>
</div>
<div id="loginContent" class="modal-body" runat="server">
</div>
<div id="loginButton" class="modal-footer">
<button type="button" class="btn btn-warning" data-dismiss="modal">OK</button>
</div>
</div>
</div>
<button type="button" style="display: none;" id="btnShowLoginModal" data-toggle="modal" data-target="#loginModal">
</button>
</div>
<script src="../Scripts/javascripts/jquery.js"></script>
<script src="../Scripts/javascripts/bootstrap.min.js"></script>
<script type="text/javascript">
function ShowLoginDialog() {
$("#btnShowLoginModal").click();
}
</script>
The function is called from code behind on OnClick Event. Still no clue which part is wrong.
protected void Button1_Click(object sender, EventArgs e)
{
string result = ValidateLogin(Username.Value, Password.Value);
if(result == MessageConstants.MessageSuccess)
{
Response.Redirect("~/Webpages/Character.aspx");
}
else if(result == MessageConstants.MessageFail)
{
ScriptManager.RegisterStartupScript(this, this.GetType(), Guid.NewGuid().ToString(), "ShowLoginDialog()", true);
}
else
{
ScriptManager.RegisterStartupScript(this, this.GetType(), Guid.NewGuid().ToString(), "ShowLoginDialog()", true);
}
}

scripttags, probably in theheadtag.