TS:MS Windows SharePoint Srvcs 3.0 Application Development:70-541CSharp
科目编号:70-541CSharp
科目名称:TS:MS Windows SharePoint Srvcs 3.0 Application Development
描述:
70-541CSharp 考试是 Microsoft 公司的 TS:MS Windows SharePoint Srvcs 3.0 Application Development 认证考试官方代号,kaoccna 的 70-541CSharp 权威考试题库软件是 Microsoft 认证厂商的授权产品,kaoccna 绝对保证顺利通过,否则承诺全额退款!
TS:MS Windows SharePoint Srvcs 3.0 Application Development 认证作为全球IT领域专家 Microsoft 热门认证之一,是许多大中 IT 企业选择人才标准的必备条件。 如果你正在准备 70-541CSharp 考试,为 Microsoft TS:MS Windows SharePoint Srvcs 3.0 Application Development认证做最后冲刺,又苦于没有绝对权威的考试真题模拟
mcsepass 实行"一次不过全额退款"承诺。如果您购买我们 70-541CSharp 的考题,只要不是首次通过,凭盖有 PROMETRIC 或 VUE 考试中心钢印的考试成绩单,我们将退还您购买 70-541CSharp 考题大师的全部费用,绝对保证您的利益不受到任何的损失。
- 科目: 70-541CSharp
- 原价:
¥ 507.00 - 现价: ¥ 358.00
kaoccna 的优势
70-541CSharp 试题的质量和价值
mcsepass 模拟测试题具有最高的专业技术含量,只供具有相关专业知识的专家和学者学习和研究之用。
100% 保证您通过 70-541CSharp 的考试
如果你使用 mcsepass 模拟测试,我们将保证你的第一次参加考试即取得成功,否则,我们将全额退款!
试用后再购买
mcsepass 提供每种产品免费测试。在您决定购买之前,请检测联接,可能存在的问题及试题质量和适用性。
kaoccna认证考试题库网专业提供 Microsoft 70-541CSharp 最新题库下载,完全覆盖 mcsepass 考试原题。
部分考题展示
Exam : Microsoft 70-541(C#)
Title : TS:MS Windows SharePoint Srvcs 3.0 Application Development
1. You create a records repository for a Microsoft Windows SharePoint Services farm.
You need to enable the Send To menu for a SharePoint site within the farm.
Which code segment should you use?
A. protected void RecordsLocation() {
SPWeb app = new SPSite("http: //portal").OpenWeb();
app.Files.Web.GetObject
("http: //portal/records/_vti_bin/officialfile.asmx");
app.Description = "Records";
app.Update();
}
B. protected void RecordsLocation() {
SPWeb app = new SPSite("http://portal").OpenWeb();
app.CustomMasterUrl =
"http: //portal/records/_vti_bin/officialfile.asmx";
app.Description = "Records";
app.Update();
}
C. protected void RecordsLocation() {
SPAdministrationWebApplication app =
new SPAdministrationWebApplication();
Uri myurl = new
Uri("http: //portal/records/_vti_bin/officialfile.asmx");
app.OfficialFileUrl = myurl;
app.OfficialFileName = "Records";
app.Update();
}
D. protected void RecordsLocation() {
SPAdministrationWebApplication app = new
SPAdministrationWebApplication();
string myurl = "http: //portal/records/_vti_bin/officialfile.asmx";
app.PublicFolderRootUrl = myurl;
app.PublicFolderRootUrl.Contains("Records");
app.Update();
}
Answer: C
2. You are creating a Microsoft Windows SharePoint Services application.
You write the following code segment. (Line numbers are included for reference only.)
01 public void DownloadDocument ( SPWeb web){
02 SPDocumentLibrary docLib = (SPDocumentLibrary)
03 web.Lists [Shared Documents];
04 const string fileShare = "C:\D ownload";
05 ...
06 }
You need to move each document to the C:Download folder. You also need to remove each document from the document library.
Which code segment should you insert at line 05?
A. foreach (SPFolder folder in docLib.Folders) {
folder.MoveTo(fileShare);
}
B. foreach (SPListItem item in docLib.Items) {
string targetPath = Path.Combine(fileShare, item.File.Name);
item.File.MoveTo(targetPath);
}
C. foreach (SPListItem item in docLib.Items) {
if (item.File.Exists) {
string targetPath = Path.Combine(fileShare, item.File.Name);
item.File.MoveTo(targetPath);
}
}
D. foreach (SPListItem item in docLib.Items) {
string targetPath = Path.Combine(fileShare, item.File.Name);
using (FileStream stream = new FileStream(targetPath,
FileMode.Create)) {
stream.Write(item.File.OpenBinary(),0,(int)item.File.Length);
}
item.Delete();
}
Answer: D
3. You create a Microsoft Windows SharePoint Services site.
You need to update the first item in a SharePoint list named MyList without triggering any alerts.
Which code segment should you use?
A. SPSite site = SPControl.GetContextSite(context);
SPList destList = site.AllWebs[0].Lists[0];
SPListItemCollection listItems = destList.Items;
SPListItem item = listItems[0];
item["Type"] = "Important";
item["Assigned"] = "No";
item.UpdateOverwriteVersion();
B. SPSite site = SPControl.GetContextSite(context);
SPList destList = site.AllWebs["MySite"].Lists["MyList"];
SPListItemCollection listItems = destList.Items;
SPListItem item = listItems[0];
item["Type"] = "Important";
item["Assigned"] = "No";
item.Recycle();
C. SPSite site = SPControl.GetContextSite(context);
SPList destList = site.AllWebs["MySite"].Lists["MyList"];
SPListItemCollection listItems = destList.Items;
SPListItem item = listItems[0];
item["Type"] = "Important";
item["Assigned"] = "No";
item.SystemUpdate();
D. SPWeb mySite = SPControl.GetContextWeb(context);
SPListItemCollection listItems = mySite.Lists["MyList"].Items;
SPListItem item = listItems.Add();
item["Type"] = "Important" ;
item["Assigned"] = "No";
item.Update();
Answer: C
4. You create a Microsoft Windows SharePoint Services application. A SharePoint site has a list named MyList. You write the following code segment. (Line numbers are included for reference only.)
01 SPWeb site = SPControl.GetContextWeb(context);
02 SPList li st = site.Lists["MyList"];
03 ...
You need to bind the list to a DataGrid control. You also need to ensure that all the fields in the list are available in the DataTable object.
Which code segment should you insert at line 03?
A. SPListItemCollection listItems = list.Items;
DataTable table = listItems.GetDataTable();
B. SPListItemCollection listItems = list.Items;
foreach (SPListItem item in listItems) {
item.Properties["Visible"]=true;
}
DataTable table = listItems.GetDataTable();
C. SPListItemCollection listItems = list.Items;
DataTable table=new DataTable();
foreach (SPListItem item in listItems) {
DataColumn col= new DataColumn(item.Name);
col.ExtendedProperties["Visible"]=true;
table.Columns.Add(col);
}
D. Guid dataViewGuid = list.Views["DataView"].ID;
SPView srcView = list.GetView(dataViewGuid);
SPViewFieldCollection viewFields = srcView.ViewFields;
SPListItemCollection listItems = list.GetItems(srcView);
DataTable table = listItems.GetDataTable();
Answer: A
5. You are creating a Microsoft Windows SharePoint Services site.
You need to add a new site column of type Choice to the site.
Which code segment should you use?
A. static void CreateSiteColumn(SPWeb web, string columnName,
bool required) {
web.Fields.Add(columnName, SPFieldType.Choice, required);
}
B. static void CreateSiteColumn(SPWeb web, string columnName,
bool required) {
web.Lists[0].Fields.Add(columnName, SPFieldType.Choice, required);
}
C. static void CreateSiteColumn(SPWeb web, string columnName,
bool required) {
web.Lists[0].Views[0].ViewFields.Add(columnName,
SPFieldType.Choice, required);
}
D. static void CreateSiteColumn(SPWeb web, string columnName,
bool required) {
SPField field = new SPFieldChoice(web.Lists[0].Fields, columnName);
field.Required = required;
field.Update();
}
Answer: A
6. You are writing a program that will periodically display activity on a Microsoft Windows SharePoint Services site.
For each job, you need to display the time that the job will run next.
Which code segment should you use?
A. foreach(SPJobDefinition job in
SPFarm.Local.TimerService.JobDefinitions) {
Console.WriteLine("Job {0} will run at {1}",
job.DisplayName, job.Schedule.NextExecution(DateTime.Now));
}
B. foreach(SPJobDefinition job in
SPFarm.Local.TimerService.JobDefinitions) {
Console.WriteLine("Job {0} will run at {1}",
job.DisplayName, job.Schedule.NextExecution(DateTime.MinValue));
}
C. foreach(SPRunningJob job in
SPFarm.Local.TimerService.JobDefinitions) {
Console.WriteLine("Job {0} will run at {1}",
job.Jo bDefinitionTitle,
job.JobDefinition.Schedule.NextExecution(DateTime.Now));
}
D. foreach(SPJobDefinition job in
SPFarm.Local.TimerService.JobDefinitions) {
Console.WriteLine("Job {0} will run at {1}",
job.JobDefinitionTitle,
job.JobDefinition.Schedule.NextExecution(DateTime.MinValue));
}
Answer: A
7. You create a TimeTracking feature and install the feature on a Microsoft Windows SharePoint Services site.
You write the following code segment. (Line numbers are included for reference only.)
01 public class TimeTrackerEventReceiver : SPFeatureReceiver
02 {
03 private void NotifyUser(SPUser user, string feature)
04 {
05 // code omitted
06 }
07 ...
08 }
You need to ensure that the site administrator is notified only when the TimeTracking feature is activated.
Which code segment should you insert at line 07?
A. public TimeTrackerEventReceiver() {
SPFeatureReceiverProperties properties =
new SPFeatureReceiverProperties();
if (properties.Definition.Farm.CurrentUserIsAdministrator()) {
SPWeb web = (SPWeb)properties.Feature.Parent;
NotifyUser(web.CurrentUser, properties.Feature.Definition.Name);
}
}
B. public TimeTrackerEventReceiver() {
SPWeb web = SPControl.GetContextWeb(new HttpContext(null));
NotifyUser(web.SiteAdministrators[0], "TimeTracker");
}
C. public override void
FeatureActivated(SPFeatureReceiverProperties properties) {
SPWeb web = (SPWeb)properties.Feature.Parent;
NotifyUser(web.SiteAdministrators[0],
properties.Feature.Definition.Name);
}
D. public override void
FeatureInstalled(SPFeatureReceiverProperties properties) {
if (properties.Definition.ActivateOnDefault) {
SPWeb web = (SPWeb)properties.Feature.Parent;
NotifyUser(web.SiteAdministrators[0], properties.Definition.Name);
}
}
Answer: C
8. You create a Web Part and deploy the Web Part to a Windows SharePoint Services site named Site1. You create a feature named MyFeature.
You write the following code segment.
SPSite site = new SPSite("http://server/site1");
SPWeb web = site.OpenWeb();
You need to activate the feature only on Site1 when the Web Part is loaded.
Which code segment should you use?
A. SPFeatureDefinition feature =
SPFarm.Local.FeatureDefinitions["MyFeature"];
web.Features.Add(feature.Id);
B. SPFeatureDefinition feature =
SPFarm.Local.FeatureDefinitions["MyFeature"];
site.Features.Add(feature.Id);
C. SPFeatureDefinition feature =
SPFarm.Local.FeatureDefinitions["MyFeature"];
site.WebApplication.WebService.Features.Add(feature.Id);
D. SPFeatureDefinition MyFeature = new SPFeatureDefinition();
site.WebAppli cation.WebService.Features.Add(MyFeature.Id);
Answer: A
9. You create a custom task list on a Microsoft Windows SharePoint Services site.
You need to prevent users from changing the custom task list. You also need to ensure that an error message is displayed when a user tries to change the list.
Which code segment should you use?
A. public override void ItemUpdating(SPItemEventProperties properties) {
properties.Cancel = true;
properties.ErrorMessage = "Updating is not supported.";
}
B. public override void ItemUpdated(SPItemEventProperties properties) {
properties.Cancel = true;
properties.ErrorMessage = "Updating is not supported.";
}
C. public override void ItemUncheckingOut (SPItemEventProperties properties) {
properties.C ancel = true;
properties.ErrorMessage = "Updating is not supported.";
}
D. public override void ItemUncheckedOut (SPItemEventProperties properties) {
properties.Cancel = true;
properties.ErrorMessage = "Updating is not supported.";
}
Answer: A
10. You create an application for a Microsoft Windows SharePoint Services site.
You need to delete all list-scoped alerts that are assigned to a user.
Which code segment should you use?
A. SPAlertCollection alerts = user.Alerts;
foreach (SPAlert alert in alerts) {
alerts.Delete(alert.ID);
}
B. SPAlertCollection alerts = user.Alerts;
foreach (SPAlert alert in alerts) {
if (alert.AlertType == SPAlertType.List) {
alerts.Delete(alert.ID);
}
}
C. SPAlertCollection alerts = user.Alerts;
foreach (SPAlert alert in alerts) {
if (alert.ListID != Guid.Empty) {
alerts.Delete(alert.ID);
}
}
D. SPAlertCollection alerts = user.Alerts;
foreach (SPAlert alert in alerts) {
if (alert.ListUrl != null) {
alerts.Delete(alert.ID);
}
}
Answer: B
11. You create a Microsoft Windows SharePoint Services list named Books. The list has a column named Stock that stores the total number of available books.
You write the following code segment. (Line numbers are included for reference only.)
01 protected override void CreateChildControls()
02 {
03 SPWeb myWeb = SPControl.GetContextWeb(Context);
04 SPList myList = myWeb .Lists["Books"];
05 ...
06 DataGrid myGrid = new DataGrid();
07 myGrid.DataSource = results;
08 myGrid.DataBind();
09 this.Controls.Add(myGrid);
10 }
You need to render a list of books for which the value in the Stock column is less than 100.
Which code segment should you insert at line 05?
A. SPQuery query = new SPQuery();
query.Query = "<Where><Leq><FieldRef Name='Stock'/><Value
Type='Number'>100</Value></Leq></Where>";
SPListItemCollection results = list.GetItems(query);
B. SPQuery query = new SPQuery();
query.Query = "<Where><Leq><FieldRef Name='Stock'/><Value
Type='Number'>100</Value></Leq/Where>";
SPListItemCollection results = list.GetChanges(query);
C. SPQuery query = new SPQuery();
query.Query = "<Where><Lt><FieldRef Name='Stock'/><Value
Type='Number'>100</Value></Lt></Where>";
SPListItemCollection results = list.GetItems(query);
D. SPQuery query = new SPQuery();
query.Query = "<Where><Lt><FieldRef Name='Stock'/><Value
Type='Number'>100</Value></Lt></Where>";
SPListItemCollection results = list.GetChanges(query);
Answer: C
12. You create a Microsoft Windows SharePoint Services site.
You need to change the group of the site column.
Which code segment should you use?
A. protected void ChangeGroup(SPWeb web, string fieldName) {
string changegroup = "MyNewColumnGroup";
SPField myF ieldName = web.AvailableFields[f ieldName];
myFieldName.Group = changegroup;
web.Update();
}
B. protected void ChangeGroup(SPWeb web, string fieldName) {
SPField myF ieldName = web.AvailableFields[f ieldName];
myFieldName.Group = "MyNewColumnGroup";
myFieldName.Update();
}
C. protected void ChangeGroup(SPWeb web, string fieldName) {
string changegroup = "MyNewColumnGroup";
SPField myF ieldName = web.AvailableFields[f ieldName];
myFieldName.SetCustomProperty("Group", changegroup);
web.Update();
}
D. protected void ChangeGroup(SPWeb web, string fieldName) {
string changegroup = "MyNewColumnGroup";
SPField myF ieldName = web.AvailableFields[f ieldName];
myFieldName.SetCustomProperty("Group", changegroup);
myFieldName.Update();
}
Answer: B
13. You are writing a console application that displays information about attachments for list items.
You need to display the name and length of each attachment for an item.
Which code segment should you use?
A. public static void DisplayAttachments ( SPListItem item)
{
foreach (string name in item.Attachments )
{
string fullName = item.Attachments.UrlPrefix + name;
FileInfo fi = new FileInfo ( fullName );
Console.WriteLine ("{0} has a length of {1}",
fullName , fi.Length );
}
}
B. public static void DisplayAttachments ( SPListItem item)
{
foreach (string name in item.Attachments )
{
SPFile spFile = item.Web.GetFile (name);
Console.WriteLine ("{0} has a length of {1}", name, spFile.Length );
}
}
C. public static void DisplayAttachments ( SPListItem item)
{
foreach (string name in item.Attachments )
{
string fullName = item.Attachments.UrlPrefix + name;
SPFile spFile = item.Web.GetFile ( fullName );
Console.WriteLine ("{0} has a length of {1}",
fullName , spFile.Length );
}
}
D. public static void DisplayAttachments ( SPListItem item)
{
foreach (string name in item.Attachments )
{
FileInfo fi = new FileInfo (name);
Console.WriteLine ("{0} has a length of {1}", name, fi.Length );
}
}
Answer: C
14. You create a Microsoft Windows SharePoint Services site that contains a document library.
You need to check out the current version of each document in the root folder of the document library.
Which code segment should you use?
A. static void CheckOutFiles(SPWeb web, string docLibraryName)
{
SPListCollection lists = web.Lists;
lists.IncludeRootFolder = true;
SPDocumentLibrary docLib =
(SPDocumentLibrary)lists[docLibraryName];
foreach (SPFile file in docLib.RootFolder.Files)
{
if (file.CheckOutStatus == SPFile.SPCheckOutStatus.None)
file.CheckOut();
}
}
B. static void CheckOutFiles(SPWeb web, string docLibraryName)
{
web.Lists.IncludeRootFolder = true;
SPDocumentLibrary docLib =
(SPDocumentLibrary)web.Lists[docLibraryName];
foreach (SPFile file in docLib.RootFolder.Files)
{
if (file.CheckOutStatus == SPFile.SPCheckOutStatus.None)
file.CheckOut();
}
}
C. static void CheckOutFiles(SPWeb web, string docLibraryName)
{
web.Lists.IncludeRootFolder = true;
SPDocumentLibrary docLib =
(SPDocumentLibrary)web.Lists[docLibraryName];
foreach (SPListItem item in docLib.Items)
{
if (item["CheckOutStatus" ].ToString() ==
SPFile.SPCheckOutStatus.None.ToString()) item["CheckOut"] = true;
}
}
D. static void CheckOutFiles(SPWeb web, string docLibraryName)
{
SPListCollection lists = web.Lists;
lists.IncludeRootFolder = true;
SPDocumentLibrary docLib =
(SPDocumentLibrary)lists[docLibraryName];
foreach (SPListItem item in docLib.Items)
{
if (item["CheckOutStatus"].ToString() ==
?SPFile.SPCheckOutStatus.None.ToString()) item["CheckOut"] = true;
}
}
Answer: A