1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / How to add a user controls

How to add a user controls

10 posts, 0 answered
  1. Vaiga
    Vaiga avatar
    26 posts
    Registered:
    27 Feb 2012
    14 Mar 2012
    Link to this post
    Hi
      Am creating a user control for flash banner in sitefiity4.4.Then how am i add this control to toolbox.

    Regards
       Sanoop.s
  2. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    14 Mar 2012
    Link to this post
    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

    http://www.marktold.com/screencast/add_control.swf

    Markus

    PS: hope I did not miss somehting.
  3. Vaiga
    Vaiga avatar
    26 posts
    Registered:
    27 Feb 2012
    14 Mar 2012
    Link to this post
    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

     
  4. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    14 Mar 2012
    Link to this post
    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
  5. Vaiga
    Vaiga avatar
    26 posts
    Registered:
    27 Feb 2012
    14 Mar 2012
    Link to this post
    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
  6. Jochem Bökkers
    Jochem Bökkers avatar
    787 posts
    Registered:
    13 Aug 2007
    14 Mar 2012
    Link to this post
    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.
  7. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    14 Mar 2012
    Link to this post
    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

  8. Vaiga
    Vaiga avatar
    26 posts
    Registered:
    27 Feb 2012
    14 Mar 2012
    Link to this post
    Hi All

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

    Regards

    Sanoop
  9. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    14 Mar 2012
    Link to this post
    Dear Sanoop
    Gald its workin. What did the trick?
    Markus
  10. Vaiga
    Vaiga avatar
    26 posts
    Registered:
    27 Feb 2012
    14 Mar 2012
    Link to this post
    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
10 posts, 0 answered