I recommend using Request.Url . To get the exact file name, you can try also using System.IO.Path
var aspxFile = System.IO.Path.GetFileName(Request.Url.LocalPath); var landed = aspxFile.Equals("obtain.aspx", StringComparison.InvariantCultureIgnoreCase); if(landed) {
source share