InterviewQuestions
Best SharePoint Interview Questions and Answers with topic wise:
Webparts & Webparts1 | Event Receivers | Event Receivers1 | Workflows: | MasterPages & MasterPage1| Content Database | Common Real-time issues | Permissions | SPQuery vs. SPSiteDataQuery | ListVsLibrary | ListVsLibrary2 | Content Types | Pages | ListVsLibrary2 | PowerShell |
Interview Questions administrator
Best SharePoint administrator Interview Questions and Answers with topic wise:
Recycle Bin | MMS | ManagedVsCrawledProperties |
Thursday, October 11, 2012
Monday, September 17, 2012
BreadCrumb In SharePoint 2010
Breadcrumb
in SharePoint:
I want to develop a breadcrumb that should have to show up
the below structure.
Root
Node-->Parent Node-->Current Node.
Approach 1:
I tried the use the existing SharePoint introduced
breadcrumb.
Tuesday, September 4, 2012
Client side validation of ASPX server controls with Best example
This is a simple validation control at
the client side using JavaScript. Here
we have to perform the server side controls validation at the client-side using
JavaScript. In below “RadiobuttonList” is server
control and we had to perform validation at the client-side first once button click operation performed.
Why
need it /Use of it:
The button
click operation will not continue/Perform if you select the “No” option in the radiobuttonlist. For this reason, we have
to perform client-side validations using JavaScript for Asp.net server
controls.
<td>
<div>
<asp:RadioButtonList ID="radiobuttonList1"
CssClass=" radiobuttonList1class" RepeatDirection="Horizontal"
RepeatColumns="2" runat="Server">
<asp:ListItem Text="Yes" Value="1"
Selected="True"
/>
<asp:ListItem Text="No" Value="0" />
</asp:RadioButtonList>
</div>
</td>
<td>
<asp:Button ID="btnSubmit"
Text="Submit"
OnClientClick="return
btnsubmit_OnClientClick();" OnClick="btnSubmit_OnClick"
runat="server"/>
</td>
|
var flag = true;
function btnsubmit_OnClientClick() {
if (Page_IsValid) //server-side
validation
{
var IsRequest = false;
var radioObj =
document.getElementById("<%=rbNeedBBAccount.ClientID
%>");
var radioList =
radioObj.getElementsByTagName('input');
for (var
i = 0; i < radioList.length; i++) {
if (radioList[i].checked) {
if
(radioList[i].value == 1) {
flag = true;
}
else
{
alert("Ur Request for xx can’t be processed, as Need for xx account field is set to NO.");
flag = false;
}
}
}
}
return flag;
}
|
Note:
- If you are using more than one Validation Groups in page, so you need to explicitly specify the group.
- Best reference URL for Asp.Net Validation using JavaScript:
Wednesday, August 29, 2012
Adding/Removing users to/from the group:
Note: We have to check before adding/removing
users to/from the group and also check the users already exists or not in group.
public void AddDeleteUsersInGroup(User user)
{
string GroupName = string.Empty;
if (user.IsAdmin.HasValue &&
user.IsAdmin.Value)
GroupName = "Group Owners";
else if
(user.IsApprover.HasValue && user.IsApprover.Value)
GroupName = " Group Members";
else
GroupName = " Group Visitors";
SPSecurity.RunWithElevatedPrivileges(delegate()
{
using (SPSite
site = new SPSite(SPContext.Current.Web.Url))
{
using
(SPWeb web = site.OpenWeb())
{
try
{
web.AllowUnsafeUpdates
= true;
SPUser spUser = web.EnsureUser(user.UserName);
if (spUser != null)
{
SPGroup spGroup = spGatingGroup(web, GroupName);
if (spGroup != null
&& (IsUserInSPGroup(spUser, GroupName.Trim())))
{
//For
adding user to the group
spGroup.AddUser(spUser);
//For removing user to the
group
spGroup.RemoveUser(spUser);
spGroup.Update();
}
}
}
catch (Exception
ex)
{
throw ex;
}
finally
{
web.AllowUnsafeUpdates = false;
}
}
}
});
}
|
Sunday, August 5, 2012
SharePoint Interview Questions and Answers: WebPart
- Webparts in SharePoint?
- Difference between .webparts and .dwp?
- Difference between asp.net webparts and SharePoint webparts?
- Webpart life cycle?
- Difference web parts visual web parts and traditional web part?
- Webpart maintenance page?
- Main webpart base classes?
- A Web Part or Web Form Control on this Page cannot be displayed or imported. The type is not registered as safe.”
- How to ensure user controls (.ascx) in webpart. I mean in which method the user controls defines?
- Out of box web parts in SharePoint?
- Add Web Part inside a Master Page in SharePoint 2010?
- Migrate webparts that are developed in SharePoint 2007 into SharePoint 2010?
- Difference between user control and webpart?
- Connectable webparts in SharePoint?
- I have created one webpart and added that in a page. Because of that webpart I am not able to open my page. So I want to delete that webpart from the page. How can I delete it?
- Can visual webparts have more than one user controls?
- Webpart deployment life cycle?
- How to define custom properties at the normal webpart and visual webpart?
- How to handle the visibility level of custom properties based on permission levels?
- How can we do validation at the client side in wp, VWP?
- Is CQWP can fetech data across site collection means from another site collection level?
Webparts:
Web Parts are
reusable components that display content on Web pages in SharePoint 2010.
A fantastic new feature in SharePoint 2010 is that you can insert a Web Part in the
text of one of the Rich Text Editor zone available in the new Wiki Page. (To
add, remove, or rearrange the text zones, use the "Text Layout" menu
in edit mode)
Subscribe to:
Posts (Atom)