当我使用asp.net按钮在引导程序中查看模式时,页面正在刷新,我想避免刷新页面并调用服务器端事件
我尝试通过以下代码停止刷新,但先刷新两次,然后再停止刷新
我试图只使用输入但不调用事件
g.generator();
myCode = g.code;
long PhoneNumber = long.Parse(PhoneNumberTextBox.Text);
const string YourAccessKey = ""; // your access key here
Client client = Client.CreateDefault(YourAccessKey);
long Msisdn = PhoneNumber; // your phone number here
MessageBird.Objects.Message message =
client.SendMessage("HealthBook", myCode, new[] { Msisdn });
SubmitButton.Attributes.Add("onclick", "return CheckStatus();");
<asp:Button ID="SubmitButton" CssClass="btn btn-info" data-toggle="modal" data-target="#exampleModalCenter"
runat="server" OnClick="SubmitButton_Click" Text="Submit" />
<!-- Modal -->
<div id="Div1">
<div class="modal fade" id="exampleModalCenter" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLongTitle">Veryfication Code:</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="form-group">
<asp:TextBox ID="verificationCodeTextBox" CssClass="form-control" runat="server" AutoPostBack="False" OnTextChanged="verificationCodeTextBox_TextChanged" type="number" MaxLength="6"></asp:TextBox>
</div>
</div>
<div class="modal-footer">
<asp:Button ID="VerifyButton" runat="server" CssClass="btn btn-success" OnClick="VerifyButton_Click" Text="Verify" />
</div>
</div>
</div>
</div>
</div>