Search code examples
sharepointsharepoint-2007web-parts

Getting List name in WebPart in SharePoint 2007


I am a beginner to SharePoint development.

I am adding a webpart to a list page. How can I get the name of the list in the webpart?


Solution

  • When operating in the context of a list, you could use SPContext.Current.List.Title