Database Reference
In-Depth Information
public override bool OnStart()
{
//Set the maximum number of concurrent connections.
ServicePointManager.DefaultConnectionLimit = 12;
//Retrieve the storage account configuration.
//Make sure to add DataConnectionString.
//Set WorkerRole Properties.
CloudStorageAccount.SetConfigurationSettingPublisher((configN
ame, configSetter) = >
{
configSetter(RoleEnvironment.GetConfigurationSettingValue(config
Name));
});
var storageAccount = CloudStorageAccount.FromConfigurat
ionSetting("DataConnectionString");
//Initialize queue storage.
CloudQueueClient
queueStorage = storageAccount.CreateCloudQueueClient();
queue = queueStorage.GetQueueReference("myqueue");
Trace.TraceInformation("Creating container and
queue...");
bool storageInitialized = false;
while (!storageInitialized)
{
//Create a message queue.
queue.CreateIfNotExist();
storageInitialized = true;
}
return base.OnStart();
}
}
}
7. Once the StudentClubDataSource object ds is initiated with the partition key, which
is the club name, the data source for the ObjectDataSource control will be illed with
information about the students who are enrolled in the same club as the new member.
To make sure that ObjectDataSource takes StudentClubDataSource as its data source,
in the Design window of the ile Dafault.aspx , click the left arrow at the upper right
corner of the ObjectDataSource control to open the ObjectDataSource task menu
and select Conigure Data Source .
8. In the Choose a Business Object page, select the object StudentClub_Info.
StudentClub DataSource from the Choose your business object dropdown list as
shown in Figure 11.24.
9. Click Next to go to the Deine Data Methods page. From the Choose a method
dropdown list, select the method GetStudentClubEntries as shown in Figure 11.25.
10. Click Next to go the Deine Parameters page. From the Parameter source dropdown
list, select Control . From the ControlID dropdown list, select RadioButtonList1 . In
the Defau ltVa lue textbox, enter none as shown in Figure 11.26. hen, click Finish .
 
Search WWH ::




Custom Search