The text of this article is not in this database — only its details are. The old site it was published on is gone, but the Internet Archive kept a copy: Sharepoint WebPart using ASP.NET web user control
8 Comments
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.

SUBRAMANI SPosted Jan 13, 2015, 4:32 AM
Actual User control deployed in the "@"~/_CONTROLTEMPLATES/15/ReuseControl/GrdUserCntl.ascx " location. Make sure the Safe control on Visual webpart(right click webpart and go to properties and check safe control attribute set to true) rights have full.I found same error but solved when follow these steps.
muthuramaneditedPosted Feb 21, 2011, 4:33 AMEdited Feb 21, 2011, 4:37 AM
Object reference not set to an instance of an object. : 'SampleWebPart.SampleWebUserControl, SampleWebPart, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9f4da00116c38ec5' is not allowed here because it does not extend class 'System.Web.UI.UserControl'. Please Revert. Regards, Muthuraman M
Jerry biPosted Aug 12, 2010, 5:59 AM
Hi Nipun Tomar, I have followed his steps, but still will not run Ajax. ConfirmButton I add the Ajax, but it is not possible.
shabaPosted May 24, 2010, 9:25 AM
Hi Nipun ...Great Article- very informative and useful! However, I get the following error when on trying to view the webPart "Object reference not set to an instance of an object: The file '/_controltemplates/WebPart1/SampleWebUserControl.ascx' does not exist. I don't understand what I am missing. Your help will greatly be appreciated. Thanks, Shabana