Monday, December 21, 2009

ASX Short Selling Report Link

https://www.asxonline.com/intradoc-cgi/groups/public/documents/reports/shortsell_gross_20091217.txt

Just change the date in the URL to view the short selling report for the date your interested in.

Thursday, December 17, 2009

Accessing the values of a SPFieldChoice

I've got a sharepoint content page that needs to populate a drop down list with the choice values stored in a site column field of type choice.

The field is defined as follow:

Name="AgeOptions"
DisplayName="Age Options"
RichText="TRUE"
RichTextMode="FullHtml"
Required="FALSE"
Group="SIA Enquiry Form"
ID="{119EFAFF-63D3-4d61-A393-06DE18A91093}"
SourceID="http://schemas.microsoft.com/sharepoint/v3">

Select an option below
10-15
15-20
20-25
25-30
30-35
Over 35




I used the following code to access the field from the code behind of my page layout:
 
SPField field = SPContext.Current.Fields["Age Options"];

if (field != null)
{
Response.Write("Found the Age options field: " + field.InternalName + " Type: " + field.TypeAsString);

SPFieldChoice ageOptions = (SPFieldChoice) field;

StringCollection choices = ageOptions.Choices;

for (int i = 0; i < choices.Count; i++)
Response.Write("Choice ->> " + choices[i] + "
");

}
else
Response.Write("Age options not found.");