SPAlerCollection class can be used to get the Alert Collection for the User.
The below code snippet is used to read all alerts registered for the site collection users.
private
static
বাতিলযোগ্য GetAlerts()
{
SPSite currSite = নতুন
SPSite(“HTTP://উদয়”);
SPWeb currWeb = currSite.OpenWeb();
SPUserCollection collUsers = currWeb.Users;
চেষ্টা
{
foreach (SPUser usr মধ্যে collUsers)
{
Console.WriteLine(“Alerts for the User : “ + usr.Name);
foreach (SPAlert alrt মধ্যে usr.Alerts)
{
Console.WriteLine(alrt.Item.Title + ” –> “ + alrt.AlertFrequency);
}
}
}
ধরা
{
}
Console.ReadLine();
}
}
একটি উত্তর ত্যাগ