 <p>If you are trying to return the script name, try:</p> <pre><code>Request.CurrentExecutionFilePath </code></pre> <p>and if you just wanted the script name without the path, you could use:</p> <pre><code>Path.GetFileName(Request.CurrentExecutionFilePath) </code></pre> <p><em>Path.GetFileName() requires the System.IO namespace</em></p>