.net – the “Browser File” in Visual Studio 2008 and why may we need it

.netvisual-studio

While adding a new file in VS 2008 website, I found something called "Browser File". Does anyone know what is this, how to use and when to use?

Best Solution

These .browser files are Browser Definition File Schemas (browsers Element) (from the MSDN documentation):

Browser definition files contain definitions for individual browsers. At run time, ASP.NET uses the information in the request header to determine what type of browser has made the request. Then ASP.NET uses .browser files to determine the capabilities of the browser, and how to render markup to that browser.

This is useful to Web developers who want to create applications that can be viewed on mobile devices, making use of control adapters that adapt the behavior of an ASP.NET Web server control depending on the type of device. For more information, see the links in the See Also section.