To get the name of the executing ASP.NET Page from server-side code by using the namespace called System.IO.FileInfo.
See the below pices of C# code which will return the current executing asp.net page like default.aspx, home.aspx.
I hope this will help you. A 'Thank You' would be nice!
See the below pices of C# code which will return the current executing asp.net page like default.aspx, home.aspx.
string sPagePath = System.Web.HttpContext.Current.Request.Url.AbsolutePath;
System.IO.FileInfo oFileInfo = new System.IO.FileInfo(sPagePath);
tring sPageName = oInfo.Name;
I hope this will help you. A 'Thank You' would be nice!