"If at first you don't succeed; call it version 1.0" :-Unknown

Pages

Monday, December 20, 2010

programically detect current aspx page name

Hi frienz,
last day my friend ask me abt this. i give him a solution but that's a long code, taking url from browser and help of split function catching the page name. Later he give me an another on just simple 2 line. I love Snipers.


String FileName = this.AppRelativeVirtualPath;
FileName = Path.GetFileName(FileName); 

Have a nice day... 'N happy Coding :)

No comments: