0

Can anyone please provide steps or a link for deploying a visual webpart with custom control in sharepoint 2013?

1

Anand,

Register the control at the top your Visual Web Part ascx file with Register tag:

<%@ Register 
TagPrefix="demo" 
Namespace="ControlsDemo" 
Assembly="ControlsDemo, Version=1.0.0.0, Culture=neutral, PublicKeyToken=01374ea14aa626aa" %>

where Namespace should be namespace of the control's class file.. You can get the PublicKeyToken by using Visual Studio Command Prompt and writing following command:

sn –T "Complete dll path"

Once you registered the control, you can use in your Visual Web Part as follows:

<demo:ServerNameControl runat="server" id="serverNameControl"/>

PS: Please follow Kirk Evan's following post
User Controls and Server Controls in SharePoint

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.