Just been asked this question as a true / false in a telephone job interview and was a little stumped. Any ideas?
You can get hold of the Response object from the HttpContext static object:
System.Web.HttpContext.Current.Response.Write("Some Text")
If current returns null then the code is not being run as part of a page request. If you get asked the question again then that's the answer but a follow up question should be "why would you need to?"
The short answer is yes. In an interview id mention UserControl for an example.
Yes, of course. If you have reference do instance of "Respone", you can call any method on them.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.