Is it necessary to lock application state before accessing it ?
Answer / kumar saurabh
Only if you're performing a multistep update and want the update to be treated as an atomic operation. Here's an example:
Application.Lock ();
Application["ItemsSold"] = (int) Application["ItemsSold"] + 1;
Application["ItemsLeft"] = (int) Application["ItemsLeft"] - 1;
Application.UnLock ();
By locking application state before updating it and unlocking it afterwards, you ensure that another request being processed on another thread doesn't read application state at exactly the wrong time and see an inconsistent view of it.
Is This Answer Correct ? | 0 Yes | 0 No |
How to convert any string to view state format in asp.net? §ÇÛ짬ªª³ö»Ç¾ö»ÂÇ¿¾»¼»¾ö¼ÉÇöÇÏǼ»Ãö®±ª§°ö«³ -- i want convert this string to view state.
Difference Between GridView And DataList
What do you mean by authentication?
Define ViewState and how can it be used?
Why do we use sessions?
Describe the role of inetinfo.exe, aspnet_isapi.dll andaspnet_wp.exe in the page loading process.
What?s the difference between Response.Write() and Response.Output.Write()?
2 Answers Siebel, Visual Soft,
I have a component with 3 parameter and deployed to client side now i changed my dll method which takes 4 parameter.How can i deploy this without affecting the clent?s code ?
1 Answers Microsoft, Satyam, Wipro,
how many script manager controls are used in Ajax web page?
7 Answers CSC, Health Prime Services, TCS,
What are the modes of updation in an updatepanel?
What is cookieless session id explain in brief?
Can you change a Master Page dynamically at runtime?