Click here to Skip to main content
15,896,359 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
I want to call Bootstrap Alert box with alert message and alert type and timeout dynamically in c#.net without MVC.
How to do it?.

My JavaScript Code Is
XML
function showalertmsg(message, alerttype) {

        $('#alert_placeholder').append('<div id="alertdiv" class="alert ' + alerttype + '"><a class="close" data-dismiss="alert">×</a><span>' + message + '</span></div>')

        setTimeout(function () {
            $("#alertdiv").remove();

        }, 5000);
}




How To Pass Message, alerttype to Javascript when i click Submit Button. And It Done Without Postback?
Posted
Updated 6-Nov-13 11:24am
v10

1 solution

 
Share this answer
 
Comments
Priyank.Patel00762 6-Nov-13 4:36am    
this is show how to use directly but not tell dynamically in c#.. Thanks Sir For Try TO Help...!!! :)
Richard MacCutchan 6-Nov-13 4:47am    
What do you mean by "dynamically"?
Priyank.Patel00762 6-Nov-13 5:04am    
This Means that how to call bootstrap alert-box through C# code on button click Event?
Richard MacCutchan 6-Nov-13 5:11am    
Bootstrap is Javascript not C#.
Priyank.Patel00762 6-Nov-13 5:22am    
but thats possible to call JavaScript By C# code...!!! :) :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900