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


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> SharePoint >> Post New Question Subscribe to Interview Questions



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?

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

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.


You can also find related Interview Question to 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?  below: 

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?

  
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. (More...)

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?

  
You can deploy the css or javascript files in _layouts folder in SharePoint's 12 hive (SharePoint2007)/14 hive (SharePoint2010)/ 15 hive(SharePoint2013). 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 . (More...)

What is a SharePoint Solution File? How does it differ from WebPart .cab files in legacy development? What does it contain?

  
A SharePoint solution file is essentially a .cabinet file with all a developers ustom componets suffixed with a .wsp extension that aids in deployment. The big difference with SharePoint solution files is is that a solution:
allows deployment to all WFE's in a farm
is highly manageable from the interface allowing deployment, retraction, and versioning
Can package all types of assets like site definitions, feature definitions (and associated components), Webparts, etc.
Can provide Code Access Security provisioning to avoid GAC deployments
And much more..
(More...)

What is a SharePoint Solution File? How does it differ from WebPart .cab files in legacy development? What does it contain?

  
A SharePoint solution file is essentially a .cabinet file with all a developers ustom componets suffixed with a .wsp extension that aids in deployment. The big difference with SharePoint solution files is is that a solution: allows deployment to all WFE's in a farm is highly manageable from the interface allowing deployment, retraction, and versioning Can package all types of assets like site definitions, feature definitions (and associated components), Webparts, etc. Can provide Code Access Security provisioning to avoid GAC deployments Just to name a few things. (More...)

What is a SharePoint Solution File? How does it differ from WebPart .cab files in legacy development? What does it contain?

  

A SharePoint solution file is essentially a .cabinet file with all a developers ustom componets suffixed with a .wsp extension that aids in deployment. The big difference with SharePoint solution files is that a solution:
allows deployment to all WFE's in a farm
is highly manageable from the interface allowing deployment, retraction, and versioning
Can package all types of assets like site definitions, feature definitions (and associated components), Webparts, etc.
Can provide Code Access Security provisioning to avoid GAC deployments
And much more..

(More...)

What are ClassResources? How do you reference and deploy resources with an ASP.NET 2.0 WebPart?

  
ClassResources are used when inheriting from the SharePoint.WebPart.WebPartPages.WebPart base class, and are defined in the SharePoint solution file as things that should be stored in the wpresources directory on the server. It is a helpful directory to use in order to deploy custom images. In ASP.NET 2.0, typically things such as images are referenced by embedding them as resources within an assembly. The good part about ClassResources is they can help to eliminate recompiles to change small interface adjustments or alterations to external JavaScript files.
(More...)

if dll and exe files are same it means you can deploy both the files in GAC?

  
No, deploying a exe file does not mean anything because classes and method are exposed in dll only and exe file is pure executable, any application can not call the function of exe file.
(More...)

How Do you deploy Files in 12 hive when using wspbuilder or vsewss?

  
Ans. Typically, you can add these files in the 12 hive folder structure in your project. In Vsewss however, you will have to create this structure manually. (More...)


What are ClassResources? How do you reference and deploy resources with an ASP.NET 2.0 WebPart?

  


ClassResources are used when inheriting from the SharePoint.WebPart.WebPartPages.WebPart base class, and are defined in the SharePoint solution file as things that should be stored in the wpresources directory on the server. It is a helpful directory to use in order to deploy custom images. In ASP.NET 2.0, typically things such as images are referenced by embedding them as resources within an assembly. The good part about ClassResources is they can help to eliminate recompiles to change small interface adjustments or alterations to external JavaScript files.

(More...)

How would you deploy WebPart Using Windows PowerShell?

  
At the Windows PowerShell command prompt (PS C:\>), type the below command :

Install -SPWebPartPack -LiteralPath "FullPathofCabFile" -Name "Nameof WebPart" (More...)

How would you re-deploy the old custom solutions in SharePoint 2010.What Changes are needed to the old Solution files.

  
SharePoint 2010 object model contains many changes and enhancements, but our custom code will still compile and, will run as expected. You should however, rewrite and recompile any code that refers to files and resources in "12 hive".
For Details See :
SharePoint Object Model - Backward Compatibility (More...)

Where are the ASP.NET configuration files stored?

  
System-wide configuration settings and some ASP.NET schema settings are stored in a file named Machine.config, which is located in the

%SystemRoot%\Microsoft .NET\Framework\versionNumber\CONFIG directory.

This directory also contains other default settings for ASP.NET Web applications in a file that is referred to as the root Web.config file. ASP.NET configuration files for individual Web sites and applications, which are also named Web.config files, can be stored in any Web site root directory, application root directory, application subdirectory, or all of these. For more information, see ASP.NET Configuration File Hierarchy. (More...)

Which are the two XML files needed for notification services?

  
SQLNS Configuration Files need a pair of XML-based configuration files: the Instance Configuration file and the Application Definition file.

Instance Configuration file
To host a SQLNS application you need an instance of SQLNS. This instance also stores subscriber information, which can be shared among all SQLNS applications hosted on an instance.

Application Definition File
This file to configure the whole SQLNS application structure along with all necessary metadata. (More...)

Can you place two .dll files with the same name in GAC (Global Assembly Cache)?

  
Yes, provided both have different versions.
GAC is a Folder that contains .dll that have strong name. So we can keep myproject.dll and myproject.dll two files into GAC with different version like 1.0.0.0 and 1.0.0.1 (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

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

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


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