If you need to access the name of the current pages sharepoint master page within a UserControl, just reference the Page object and access its MasterPageFile variable
public partial class CustomUserControl : UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
String currentMasterPage = Page.MasterPageFile;
}
}
Its quite interesting, there are loads of articles showing how to display multiple items from a list but what if you only want to display one list item and have it formatted nicely. Of course you could use jQuery but if you want do do it without the little javascript angel then the content query webpart (CQWP) will answer your prayers.
To retrieve the ID of a new item added to a list using spservices use this line of code in the completefunc
When using GetListItems with SPServices, to retrieve list items, there will be situations when you want to also get the created by and modified by values as well... Intuition tells you that it should be something like FieldRef='Created_x0020_By' or FieldRef='Modified_x0020_By' but this is not the case
Created by is actually a field called 'Author' and Modified by is a field called 'Editor'.
Incidentally... to find out what the field is called, visit the list settings page of the list you are trying to get information from, hover over the column you would like. There should be a url that appears when you hover depending on your browser... at the end of the url is the field name that you need.
Mixing javascript and application wsp code can be a bit of a nightmare for web developers new to sharepoint... and also for sharepoint/application developer who are new to web development technologies
Separating your javascript and css code, into .js and .css files, and out from your application code will make it significantly easier to develop and here's why...