第二のJavaScript/jQueryの機能を使用して5後のdivとlableを隠しDIVです:は、ここでのC#
<div class="alert alert-success alert-dismissable" runat="server" visible="false" id="lblmsgid">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<asp:Label runat="server" ID="lblmsg" Font-Bold="true" Visible="false"></asp:Label>
</div>
私は数秒使用してクライアント側コードの後のdivを非表示にします。 ここで私はバックエンドでC#を使用しています。
else if (e.CommandName.Equals("CategoryDelete"))
{
objCategory.CategoryDelete(Convert.ToInt32(e.CommandArgument));
lblmsgid.Visible = true;
lblmsg.Text = "Delete Successful..";
BindCategory();
}
私のグリッドから削除ボタンをクリックした後、私は上記のlableにエラーメッセージを表示したい(lableはdiv要素である)と、数秒後、私はdiv要素を非表示にする... 私はどのように行うことができます??ここ
は、アクティベートするためのボタンである。
<asp:Button ID="btnActivate" runat="server" OnClick="BtnActivate_Click" CssClass="btn-active" Text="Activate Selected" OnClientClick="javascript:return TestCheckBox();" />
あなたがしようとしているコードを投稿してください。 –
ボタンのクリックイベントハンドルを表示します。 – spirit
はい私は既にコードを見て編集しました。私は次のようです.http://stackoverflow.com/questions/10591013/display-div-for-few-seconds-and-disappear-using-asp-net-code -behind –