Can you delete values stored in HttpContext.Current.Application["variable"]? Or is the only way to do this is by setting it to an empty string?
You can use Application.Remove, Application.RemoveAll, and Application.RemoveAt methods.
Use
HttpContext.Current.Application.Remove("variable");
Also, setting to null is fine since if you try to read HttpContext.Current.Application["variable"] and there is no value there, it will return null anyway, but of course better to be explicit if what you want is remove.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With