开发者

change span only when SQL server table changed - ajax asp.net 3.5 jQuery SQL server

开发者 https://www.devze.com 2023-02-19 21:01 出处:网络
I have asp.net label called NumberLabel.It is changed from code-behind (asp.net/c#) by calculating the number of rows in an SQL server table called "MyTable".

I have asp.net label called NumberLabel. It is changed from code-behind (asp.net/c#) by calculating the number of rows in an SQL server table called "MyTable".

Every time a user open this page, the same code/stored procedure is executed to bring the number.

Is there a way to to bring the same number for all users and change it only when there is an update in "MyTable"? This will optimize a lot time, executions, (SQL server side and webserver side). Does asynchronous C# exist? Or doing that by ajax?

Best Regards,开发者_C百科


You can use application-level asp.net caching. See http://msdn.microsoft.com/en-us/library/ms178597.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消