How to create a Web Part in SharePoint To Show All List and List Items

I did try this by reading the following article:

http://www.dotnetcodesg.com/Article/UploadFile/2/217/Web%20Part%20in%20SharePoint%20To%20Show%20All%20List%20and%20List%20Items.aspx

but when I am building that web part I am getting some errors

public partial class ShowListUserControl : UserControl

by default there is webpart written in place of UserControl and when I am changing this and build this program the error related to global WebPartTemplate comes in the function

How can I solve this?


Some one said to me that in Sandbox Webpart you can not create UserControl but the above article also is based on that.

January 30th, 2014 5:28am

The article might have missed the step where the blogger might have missed the step. Read the following article and which confirms that you cannot use user controls in SB solutions.

http://msdn.microsoft.com/en-us/library/gg615454.aspx

If you are trying to build this in SharePoint 2013 then you must know that custom code is deprecated from SB solutions.

Deprecation of Custom Code in Sandboxed Solutions

For SP 2013 your best bet is to create an APP or create a farm solution (God please forgive me). :)

Free Windows Admin Tool Kit Click here and download it now
January 30th, 2014 5:53am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics