SPContext.ItemIdAsString property
SharePoint 2013
Gets or sets a string value for the ID of the list item that is associated with the request context.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Property value
Type: System.StringA string value for the ID of the list item that is associated with the page. When the page is not associated with a list item, the value “0” is returned.
When this property is set, the ItemId property is set to InvalidItemId.