Showing posts with label SharePoint 2013 Development. Show all posts
Showing posts with label SharePoint 2013 Development. Show all posts

Sunday, May 17, 2015

Could not load file or assembly ‘$SharePoint.Project.AssemblyFullName$’ or one of its dependencies. The system cannot find the file specified.

There are lot of scenarios where you can face this issue. I will explain scenario which i faced.

Scenario

I have all the solution deployed and running already on the production server. My task was to just change an html link in the .ascx control. I changed the control and rather than deploying whole solution, i copied .ascx control and put it in the 14 hive control templates. I restarted IIS and refreshed page, i found following exception,

Could not load file or assembly ‘$SharePoint.Project.AssemblyFullName$’ or one of its dependencies. The system cannot find the file specified.


Solution

Luckily error was pointing towards the new custom control that i deployed. I opened file and searched for "$SharePoint.Project.AssemblyFullName$". Replace this string with the actual assembly name, version and culture (If you deploy with visual studio, it changes it automatically but as it was manual deployment, i needed to copy control's assembly and replace with the "$SharePoint.Project.AssemblyFullName$"). Restart IIS and problem was solved.

Sunday, September 28, 2014

Opening InfoPath Form in Modal Dialog

Question 


How to open InfoPath New and Edit forms in the Modal dialog?


Answer


Let us start with new fresh InfoPath Library. Create an InfoPath Library and call it "AccordionForms". The path of library would be like,


Let us examine new and edit form URLs.


New InfoPath Form:


If you click on the new item link, it would redirect to URL,


Wednesday, September 24, 2014

Create Info Path Accordion (Show Hide Section)

Previously i worked on the project which used InfoPath form. The Form had many sections and each section had scrolling and lot of data. I needed to introduce accordion in the form. I needed to add buttons to show hide any section of the form so that user can focus on what is required. InfoPath is different than the normal JQuery accordion where you can hide or show any thing based on script or just CSS. In InfoPath you need to add behavior and Rules for each button and section which we want to hide or we want to use as changing behavior or variable. Following is the how i achieved it,
1- First thing first, add two picture buttons (Having up and down pictures).  

2- Add Boolean variable ESShow and set its default value as 0 if you want to hide section when InfoPath form loads otherwise set its default value 1.


Content Editor Web Part Example (Writing Custom Web Part

The Content Editor Web Part (CEWP) allows you to add text, html, JQuery or styles to a SharePoint page. It is great to use this if you,

  1. Are good in JQuery or Javascript.
  2. Want to use Web Services, REST API (Introduced in SharePoint 2013) or ECMA script.
  3. Need One or two pages of customization and do not want to touch Visual Studio and going through process of uploading solutions.
  4. Do not have deployment permissions on Central Administration.

Add a Web Part to a page


1. From a page, in the ribbon, click the Page tab, and then click the Edit command.

Image: Edit command of the Edit tab