Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Carsten Husek 8 posts 12 karma points
    Jul 07, 2009 @ 17:50
    Carsten Husek
    0

    Using a Plain Old aspx page (POAP)

    I want to include a Plain Old aspx page (POAP) in my umbraco project. The page contains something like this:

    <codesnippet>

    ...

    <asp:GridView .... />

    <asp:SqlDataSource ... />

    ...

    </codesnippet>

    As you can see I want to reuse a page with a long and complicated table built into it. I would prefer to have the rest of the pages done in an CMS (= umbraco) but I need this sql-based table from the POAP. Is there any way to do this? I already tried to encapsulate the table in a User Control following the hints of Tim Geyssens , but this won't work, at least not if I include some component which uses SQL, so I guess I need an POAP to do the work ....

  • Comment author was deleted

    Jul 07, 2009 @ 17:53

    Hi Carsten,

    It should be possible to use any component you want. What's the error you get when trying to encapsulate in a user control ?

  • Carsten Husek 8 posts 12 karma points
    Jul 07, 2009 @ 18:30
    Carsten Husek
    0

    Hello Tim, thanks for your site, it's very helpful for an umbraco noob.

    I get this exception:

    <exception>

    [NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.]
       umbraco_usrCntrl.test_uc.Page_Load(Object sender, EventArgs e) in C:\Users\chusek\Documents\Visual Studio 2008\Projects\umbraco_usrCntrl\umbraco_usrCntrl\test_uc.ascx.cs:17
       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
       System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
       System.Web.UI.Control.OnLoad(EventArgs e) +99
       System.Web.UI.Control.LoadRecursive() +50

    </exception>

    When I test the user control in the same project in which i created it (by <%@ Register ... %>) everything works fine, so my guess is that the usercontrol dll references something outside itself, that isn't in the dll.

    umbraco_usrCntrl.test_uc.Page_Load merely checks how many lines there are in the GridView and does't do anything else. Still page_load is probably the place where sqldatasource fills the gridview.

  • Carsten Husek 8 posts 12 karma points
    Jul 08, 2009 @ 12:14
    Carsten Husek
    0

    Arrgh, I just made a stupid mistakes. So feel free to load me up with bad karma.

    The root of the problem was that when changing the user control from simple version (Btn/ textbox) to (gridview/sqlDataSource) I only deployed the new .dll not the .ascx. Oops.

    Also, I needed to transfer the connectionString.

Please Sign in or register to post replies

Write your reply to:

Draft