.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!




Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.


Post New Question Subscribe to Interview Questions
 
Quick Links For Interview Questions Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  OOPs  JQuery  JavaScript/VBScript
BiztalkPatten/Practices.IISWCFWPFWWF
NetworkingAptitudeOthers  All    
 

Interview Questions And Answers

How does XAP work in silverlight?

Author: Sasi Prabhu          Posted Date: November 30, 2011    Category: Silverlight     Points: 40

A basic xap file in silverlight will have an assembly related to specific code for the application, an
application manifest file and any additional assemblies need to run the application. At a minimum, two files are
needed, the application manifest file and the application assembly. For example:
AppManifest.xaml
MyPianoV2.dll
Once you have created the .xap file, the Silverlight 2 or 3 plug-in downloads the file and runs it in a separate
work space.



Q. What are the best practices for SharePoint development.

Author: Sasi Prabhu          Posted Date: October 31, 2011    Category: SharePoint     Points: 40

Ans. Some of the best practices are:

1. You should always dispose SPsite and SPWeb objects, once you refer them in your code. Using the "Using" clause is recommended.

2. Use RunwithelevatePrivilages to avoid errors for end users.

3. Try writing your errors to SharePoint error logs (ULS Logs). Since it's a bad idea to fill-up event log for your production environment.

4. Use SPQuery instead of foreach loop while retrieving Items from the list.

5. Deploy additional files used in your webpart to 12 hive. Use your solution package to drop the files in 12 hive. Also, make sure that all the references (for e.g. Css or .js files) get removed when the solution is retracted.



Q: When should you dispose SPWeb and SPSite objects?

Author: Sasi Prabhu          Posted Date: October 31, 2011    Category: SharePoint     Points: 40


Ans. According to the best Practices you should always dispose them if you have created them in your code. You can dispose them in Finally block or you can use the "Using" clause, so that they gets disposed when not required. If you are using SPContext then you need not dispose the spsite or spweb objects.



Q. Where do you deploy the additional files used in your webpart, like css or javascript files, and how do you use them in your WebPart?

Author: Sasi Prabhu          Posted Date: October 31, 2011    Category: SharePoint     Points: 40


Ans. You can deploy the css or javascript files in _layouts folder in SharePoint's 12 hive. To use them in your webpart, you need to first register them to your webpart page and then specify a virtual path for the file for e.g. _layouts\MyCSS.css See Code examples at Using External Javascript, CSS or Image File in a WebPart.



Q. Can you give a example where feature receivers are used.

Author: Sasi Prabhu          Posted Date: October 31, 2011    Category: SharePoint     Points: 40

Ans. You can use it to assign an event receiver feature to a specific type of list or can write a code in a feature receivers Deactivate method to remove a webpart from webpart gallery.



Q. Why do you use Feature Receivers ?

Author: Sasi Prabhu          Posted Date: October 31, 2011    Category: SharePoint     Points: 40


Ans. Feature Receivers are used to execute any code on Activation\Deactivation of a Feature. You can use it for various purposes.



Q. What is the difference between a Site Definition and a Site Template?

Author: Sasi Prabhu          Posted Date: October 31, 2011    Category: SharePoint     Points: 40


Ans. Site Definitions are stored on the hard drive of the SharePoint front end servers. They are used by the SharePoint application to generate the sites users can create. Site Templates are created by users as a copy of a site they have configured and modified so that they do not have to recreate lists, libraries, views and columns every time they need a new instance of a site.

Q. How will you add Code behind to a Custom Applictaion Page or a Layout Page in SharePoint?

Author: Sasi Prabhu          Posted Date: October 31, 2011    Category: SharePoint     Points: 40


Ans. You do not deploy a code behind file with your custom Layouts page. Instead, you can have the page inherit from the complied dll of the solution to access the code behind.

How to create links to the mapped network drives?

Author: Sasi Prabhu          Posted Date: October 31, 2011    Category: SharePoint     Points: 40


Creating links to mapped drives in WSS v3 or MOSS 2007 can be done via
the new content type for .lnk files.

Can multiple SharePoint installs point to the same DB?

Author: Sasi Prabhu          Posted Date: October 31, 2011    Category: SharePoint     Points: 40

Multiple SharePoint installs can use the same database server. Not literally the same database on that server. That server must be SQL Server 2000 or SQL Server 2005. It cannot be Oracle or another vendor.


 




Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend