ASP.NET provides the HttpRuntime.CodeGenDir property which gets the physical path to the directory where ASP.NET stores temporary files (generated sources, compiled assemblies, and so on) for the current application.
protected void Page_Load(object sender, EventArgs e)
{
Response.Write(HttpRuntime.CodegenDir);
}
protected void Page_Load(object sender, EventArgs e)
{
Response.Write(HttpRuntime.CodegenDir);
}