R – webpart – sharepoints

sharepoint

I've created a user control and added that user control to my webpart. But when i try to add the webpart in a page. i am facing the above stated problem.I ensured that dll was present in GAC.
I've created a user control and added that user control to my class library. I've compiled and signed the dll and have added it to the gac. But when i try to add the webpart in a page i'm getting the below mentioned error.And made necessary changes in web.config file.
I've made sure that dll is there in the gac. But i'm still getting the same error.

" An error occurred during the processing of . Could not load the assembly 'Generate ,       Version=1.0.0.0, Culture=neutral, PublicKeyToken=e5b42758c1bfd2df'. Make sure that it is compiled   before accessing the page. "

please help me.

Best Answer

  • Make sure the user control inherits from the solution assembly in the Control tag
  • Load the control in the CreateChildControls method of the Web Part
  • Put this user control under the CONTROLTEMPLATES folder

Are you deploying is as a Feature?

To debug locally, check the following in your config file:

* customErrors=off
* Enable Stack Traces by adding CallStack=”true” to the SafeMode tag
* Set the compilation debug attribute to "true"
Related Topic