Thanks Vinay. I found Me.GetType().Name which is also works for me.
Thanks for your help, William. On Jun 1, 6:03 am, vinay kumar <[email protected]> wrote: > Hi william, > > please try this method > > public string GetCurrentPageName() > { > string sPath = System.Web.HttpContext.Current.Request.Url.AbsolutePath; > System.IO.FileInfo oInfo = new System.IO.FileInfo(sPath); > string sRet = oInfo.Name; > return sRet; > > } > > regards, > Vinay > > > > On Fri, May 27, 2011 at 10:05 PM, Will <[email protected]> wrote: > > I am fairly new to VB.NET <http://vb.net/> programming and need to find > > out how do I > > get the web from name from my basepage class. > > > Currently I have a basepage class with descendant classes that inherit > > from that. I need to write code that says: > > > IF Me.PageName = 'lst.aspx' THEN > > do something > > ELSE > > do something else > > END IF > > > I'm not looking for > > System.Web.HttpContext.Current.Request.Url.AbsolutePath. > > > Any help would be much appreciated. > > > Thanks, > > > William > > > -- > > You received this message because you are subscribed to the Google > > Groups "DotNetDevelopment, VB.NET <http://vb.net/>, C# .NET, > > ADO.NET<http://ado.net/>, > > ASP.NET <http://asp.net/>, XML, XML > > Web Services,.NET Remoting" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected] > > For more options, visit this group at > >http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en > > or visit the group website athttp://megasolutions.net- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en or visit the group website at http://megasolutions.net
