How to add a user controls

Posted by Community Admin on 03-Aug-2018 08:11

How to add a user controls

All Replies

Posted by Community Admin on 14-Mar-2012 00:00

Hi
  Am creating a user control for flash banner in sitefiity4.4.Then how am i add this control to toolbox.

Regards
   Sanoop.s

Posted by Community Admin on 14-Mar-2012 00:00

Create your .ascx
Build your project
upload sitefinity.dll
upload the .ascx files
go to administration, settings
click on advanced settings
scroll down to toolboxes
Add a section if you need one and add the control.
Exapnd Toolboxes, PageControls, Tools

www.marktold.com/.../add_control.swf

Markus

PS: hope I did not miss somehting.

Posted by Community Admin on 14-Mar-2012 00:00

Hi Markus..
      Thank you for your response.am doing the same.Now my user control is show in widget list.But when drag it to a template,got a error message.Please find my screen shot.
Hop you can help me..

Regards
sanoop

 

Posted by Community Admin on 14-Mar-2012 00:00

Dear Sanoop

a) did you upload your control to the server?
b) Is the path correct?
c) Did you use the tilde in front ~/ of your path?
d) did you build the project?
e) did you upload sitefinity.dll?
f) did you restart the app?

If this all fails I guess I would open a support ticket.

Markus

Posted by Community Admin on 14-Mar-2012 00:00

Hi Markus.
    Sorry i have no idea about uploading sitefinity dll.am running my application in localy.so if there any need to upload dl?  if yes how can i upload it?
Once again thanks for your valuable time..
Regards
Sanoop

Posted by Community Admin on 14-Mar-2012 00:00

Hey Sanoop,

Markus was completely right, you need to 'rebuild' your sitefinity.dll (local or remote).

By default when you create a .ascx file you'll have a top line something like this:

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="uc_widget.ascx.cs" Inherits="SitefinityWebApp.widget" %>

The "CodeBehind" means you have to rebuild your project every time you make changes to your widget and upload the widget and the .dll.

If you change it to "CodeFile" you just have to copy the widget files (including the .cs) to the server.

Jochem.

Posted by Community Admin on 14-Mar-2012 00:00

Sorry Sanoop
Well of course you don't need to upload it since you are working localy, but you should build the project.
I would open a ticket
Markus

Posted by Community Admin on 14-Mar-2012 00:00

Hi All

   Thank you very much..It is working...

Regards

Sanoop

Posted by Community Admin on 14-Mar-2012 00:00

Dear Sanoop
Gald its workin. What did the trick?
Markus

Posted by Community Admin on 14-Mar-2012 00:00

Markus..

     Am just delete the control and create it again.Then it is working properly...
        Anyway once again thanks for your valuable suggestions

Regards,
Sanoop

This thread is closed