Can be used push models in asp.net using c# -


i have show notification or alert on asp.net page based on database server data insertion, want know if possible task push models?

you can use signalr send notifications web server clients: http://signalr.net/.

to send notifications sql server web server, can use sqldependency , sqlcachedependency classes.

from guidelines, http://msdn.microsoft.com/en-us/library/9dz445ks(v=vs.110).aspx,

sqldependency.start(myconnectionstring);  using (sqlconnection connection = new sqlconnection(myconnectionstring)) {     using (sqlcommand command = new sqlcommand("select ... mytable", connection))     {         sqlcachedependency dependency = new sqlcachedependency(command);         // refresh cache after number of minutes         // listed below if change not occur.         // value stored in configuration file.         int numberofminutes = 3;         datetime expires = datetime.now.addminutes(numberofminutes);          response.cache.setexpires(expires);         response.cache.setcacheability(httpcacheability.public);         response.cache.setvaliduntilexpires(true);          response.addcachedependency(dependency);          connection.open();     } } 

Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -