How to remove a Session variable
Use HttpSessionState.Remove()
Is there any way to know how much memory is being used by session variables in my application?
No
How can I programatically invalidate the outputcache from a usercontrol
You could add a dependency to the output cached control, and change the dependency to evict the control. Here’s code to do that: VB.NET If TypeOf Parent Is System.Web.UI.BasePartialCachingControl Then Cache(‘dependent’) = ‘dependent’ Dim dep As New CacheDependency(Nothing, New String() {‘dependent’}) ’ CType(Parent, System.Web.UI.BasePartialCachingControl).Dependency = dep End If C# if (Parent is System.Web.UI.BasePartialCachingControl) { Cache[‘dependent’] = ‘dependent’; CacheDependency dep = new CacheDependency(null, new string[] ‘dependent’); ((System.Web.UI.BasePartialCachingControl)Parent).Dependency = dep; }
Is caching PDF Files a good or bad idea
If the PDF files are on the disk, you should just let the IIS handle them. The IIS static file handler performs caching and is much faster than the ASP.NET cache.
How can I get the value of input box with type hidden in code-behind
You can set the runat= server for the hidden control and you can use ControlName.Value to get its value in CodeBehind file