ASPX Code:-
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <title></title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> <style type="text/css"> .messagealert { width: 100%; position: fixed; top:0px; z-index: 100000; padding: 0; font-size: 15px; } </style> <script type="text/javascript"> function ShowMessage(message, messagetype) { var cssclass; switch (messagetype) { case 'Success': cssclass = 'alert-success' break; case 'Error': cssclass = 'alert-danger' break; case 'Warning': cssclass = 'alert-warning' break; default: cssclass = 'alert-info' } $('#alert_container').append('<div id="alert_div" style="margin: 0 0.5%; -webkit-box-shadow: 3px 4px 6px #999;" class="alert fade in ' + cssclass + '"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a><strong>' + messagetype + '!</strong> <span>' + message + '</span></div>'); setTimeout(function () { $("#alert_div").fadeTo(2000, 500).slideUp(500, function () { $("#alert_div").remove(); }); }, 5000); //5000=5 seconds } </script> </head> <body> <form id="form1" runat="server"> <div> <div class="messagealert" id="alert_container"> </div> <div style="margin-top: 100px; text-align:center;"> <asp:Button ID="btnSuccess" runat="server" Text="Submit" CssClass="btn btn-success" OnClick="btnSuccess_Click" /> <asp:Button ID="btnDanger" runat="server" Text="Danger" CssClass="btn btn-danger" OnClick="btnDanger_Click" /> <asp:Button ID="btnWarning" runat="server" Text="Warning" CssClass="btn btn-warning" OnClick="btnWarning_Click" /> <asp:Button ID="btnInfo" runat="server" Text="Info" CssClass="btn btn-info" OnClick="btnInfo_Click" /> </div> </div> </form> </body> </html>
Code Behind:-
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class _Default : System.Web.UI.Page { public enum MessageType { Success, Error, Info, Warning }; protected void Page_Load(object sender, EventArgs e) { } protected void ShowMessage(string Message, MessageType type) { ScriptManager.RegisterStartupScript(this, this.GetType(), System.Guid.NewGuid().ToString(), "ShowMessage('" + Message + "','" + type + "');", true); } protected void btnSuccess_Click(object sender, EventArgs e) { ShowMessage("Record submitted successfully", MessageType.Success); } protected void btnDanger_Click(object sender, EventArgs e) { ShowMessage("A problem has occurred while submitting data", MessageType.Error); } protected void btnWarning_Click(object sender, EventArgs e) { ShowMessage("There was a problem with your internet connection", MessageType.Warning); } protected void btnInfo_Click(object sender, EventArgs e) { ShowMessage("Please verify your data before submitting", MessageType.Info); } }
Output Screenshot:-
80 thoughts on - Show and Auto close bootstrap alert messages after few seconds in Asp.Net C#
https://buystromectolon.com/ – Stromectol
Finasteride 3 Meses Propecia
Finishing Amoxicillin
ivermectin amazon
Viagra
I do not know whether it’s just me or if perhaps everyone else experiencing
issues with your site. It appears like some of the written text on your
posts are running off the screen. Can somebody else
please comment and let me know if this is happening to them too?
This could be a issue with my browser because I’ve had this happen previously.
Cheers
Feel free to visit my web blog … Sammy
https://buysildenshop.com/ – Viagra
Comprar Cialis Andorra Precio
Propecia
Aacifemine Clomid
where to buy cialis cheap
http://buytadalafshop.com/ – generic cialis 5mg
http://buypropeciaon.com/ – ger prescriptions online for proscar
http://buypriligyhop.com/ – Priligy
Achats Kamagra
amazon priligy
viagra venta libre
lasix iv push
https://buylasixshop.com/ – furosemide trade name
Zithromax
Comprar Cialis En Malaga
plaquenil for corona virus
https://buyzithromaxinf.com/ – superdrugsaver in india
is gabapentin considered a painkiller?
http://buyneurontine.com/ – Neurontine
Prednisone
https://prednisonebuyon.com/ – prednisone dosage
Propecia Storage
Propecia Depression Hair Transplant
Stromectol
Provence
buy finasteride in singapore
cialis for dog cardiac problems
For Sale Discount Generic Acticin Real
Prednisone
Miglior Sito Per Acquisto Cialis
Can Amoxicillin Cure Blackheads
valtrex over the counter
Ebay Levitra 10 Mg
Buy Levitra Without Rx
buy kamagra generic kamagra publicidad de kamagra
Sherryaeroro One of a pair of tubes or ducts leading from the ovary to the upper portion of the uterus. levitra original precio soyloart
Wirkung Viagra Animation Ouqxkf Plaquenil Female Cialis Recomended Dose
Cialis Spezzato Prednisone
fast acting cialis Mcqbsw Plaquenil Ihaijx Amoxicillin Acne
viagra for sale online sildenafil sildenafil online
buy cialis cheap Prix Kamagra 10 Mg
Typical cost per pill buy cialis
Serve as a male form of birth control Take CIALIS or generic CIALIS exactly as your healthcare provider prescribes it priligy alternative If any of these severe side effects occur, seek medical care immediately
generic cialis online europe Additionally, we export our product to Spain, Italy, China, and USA
real cialis no generic The same is true of erectile dysfunction medications
order clomid from india online There were many tall icebergs.
where to buy nolvadex reddit
doxycycline dog dosage chart Gulf War Illness Is Compensated By Veterans Disability Benefits.
We chat about Flip The Table, playing HeartThrob, buy generic cialis online
wow, awesome article.Much thanks again. Want more.
https://howtopreventtonsilstones93415.mybuzzblog.com/17975819/about-rv-ac-repair-near-me
2009 Jun; 80 6 1099 106 does lasix cause diarrhea
Few examples of such medicines include antidepressants like monoamine oxidize inhibitors and selective serotonin reuptake inhibitors stromectol to buy
reported chiral inhibitor aromatase and dual aromatase steroid sulfatase inhibitor 121 from the letrozole template with an IC 50 value of 14 ivermectin for humans Certain orchids, for example, produce pheromones that mimic sex hormones, and through hormone receptors in the olfactory bulb in the brain, they elicit copulatory behavior in bees and wasps
a The obvious metastasis is detected in one lymph node and the infiltrating tumors cells appear in a cribriform pattern clomiphene citrate 50 mg men
Test Cypionate is a great injectable steroid for beginners due to its longer ester, meaning it will not need to be administered as frequently as other compounds lasix for weight loss
Hey there! Do you use Twitter? I’d like to follow you if that wouldbe okay. I’m undoubtedly enjoying your blog and look forward to new posts.
https://suba.me/
Monitor Closely 1 isoniazid increases levels of brentuximab vedotin by affecting hepatic intestinal enzyme CYP3A4 metabolism ivermectine msd
bumex to lasix Reprinted with permission from Shipway AN et al
EZ Pay is the convenient newspaper payment plan that conveniently applies your subscription payment to your credit card or debit card Miquel, USA 2022 04 23 13 12 01 viagra effect
Bear in mind, however, that while the early onset models may be faster to study, they also create a disconnect between chronological age and pathological condition that does not accurately reflect the aging physiology under which most AD will occur accutane walmart The noted positive physiological effects of reasonable dosages of thyroid hormones included
Berrocal T, Gaya F, Arjonilla A, Lonergan GJ cheapest cialis
torsemide to lasix conversion I was on clomid for 1 cycle and didn t respond too well with it, only had 1 mature follicle after having 3 in sept naturally
Other research has suggested that marijuana is bad for men s fertility viagra actress Clinical trial results have been disappointing with early use in high risk outpatients 7 and also in hospitalized patients with advanced disease
Testosterone and glucose metabolism in men current concepts and controversies overnight cialis delivery
Value Description N 0 No 54, 837 94 tamoxifen citrate 20mg 18 Anaphylaxis and Other Hypersensitivity Reactions
J Health Commun 2015; 20 10 1177 1184 lasix Norway
Also, any idea on why the nipple would increase in sensitivity and the lump slightly increase 5 weeks into the letro cycle viagra priligy
azithromycin warnings Slow, consistent weight loss to a target of 7 10 through a diet designed to produce a caloric deficit of 750 1000 kcal day is advised
The p53 inducing drug dosage may determine quiescence or senescence order priligy online
This fact, simple alone, gives a great deal of weight to the premise that losing sleep can promote breast cancer almost as effectively as not nursing long enough tamoxifen for sale
The combination treatment resulted in the lowest level of E 1 in the tumors, which was significantly lower than treatment with calcitriol alone p 1 levels in the surrounding mammary adipose tissue reflected a similar decreasing trend following treatments with calcitriol or letrozole as single agents, which was not statistically significant beli kamagra malaysia I think Dr Greger is fabulous for all of the work he puts in to educating those of us who are interested, however let s not forget the bias of veganism
brand name cialis online inflammation of the stomach, and intestinal pain 4
No, someone with gonorrhea cannot pass it along via kissing п»їcialis Management Strategies Prevention and Treatment
E2 and E2 tamoxifen treated cells showed upregulation of apoptotic genes caspase 1, 3, 9, P53 and Bcl xl but the tamoxifen and paclitaxel treated cells did not upregulate the apoptotic genes cialis online