How to add alert using bootstrap success and fail

Posted by Dipesh010 under .NET Framework on 11/24/2013 | Points: 10 | Views : 3223 | Status : [Member] | Replies : 0
I have written a little program, a user enters his firstName and surname. When clicking add this program should add data into the database. I have created a local database for this. If the program manage to add data then a success alert should appear else a error should appear. The alert should disappear after a few seconds. For this I have used Bootstrap framework which has the built in features. Can anyone help me implement this- this is my code:
<div id="dep" class="tab-pane active">
<div>
<div class="dip">
<br />
<asp:Label ID="lbName" CssClass="form-group" runat="server" Text="Name:">
</asp:Label>
<asp:TextBox ID="name" CssClass="form-control" runat="server">
</asp:TextBox>
</div>
<div class="dip">
<br />
<asp:Label ID="lbsname" CssClass="form-group" runat="server"
Text="Surname:"></asp:Label>
<asp:TextBox ID="sname" CssClass="form-control" runat="server">
</asp:TextBox>
</div>
<div>
<br />
<asp:Button ID="add" data-dismiss="modal" aria-hidden="true" runat="server"
Text="Add" OnClick="add_Click" />
</div>
</div>
</div>

I have a example here http://bootstrap.stage42.net/doc/alerts but how do i make it link to the database so when I click 'Add' button it should display appropriate alert.




Responses

(No response found.)

Login to post response