Copied to clipboard

Flag this post as spam?

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


  • Dan 43 posts 72 karma points
    Oct 31, 2011 @ 15:22
    Dan
    0

    Custom section with UmbracoEnsuredPage

    Howdy. I've created a custom section within umbraco backend and I am having a problem with postbacks.

    I have an aspx page that inherits umbraco.BasePages.UmbracoEnsuredPage and I am loading a usercontrol that contains a DataGrid. When I try edit the datagrid, the first postback works fine and I can edit, but then the Update command just never gets hit. It's like the 1st postback causes the rest of the page to lose viewstate.

    Anyone had this before? Is there anything I should be aware of?

     

  • Dan 43 posts 72 karma points
    Oct 31, 2011 @ 16:05
    Dan
    0

    Okay, sorted... turns out I had to bind the datagrid in Page_Init and Page_Load.

    http://our.umbraco.org/forum/developers/extending-umbraco/4230-Persisting-DropDownList-on-PostBack-%28in-custom-sectiontree-page%29?p=0#comment15318

    I really will get the hang of the whole page lifecycle one of these years.

     

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Oct 31, 2011 @ 16:51
    Lee Kelleher
    0

    Glad you figured it out... get yourself into ASP.NET MVC dude, all that PostBack stuff will be a thing of the past - just like classic ASP dayz! ;-)

  • Dan 43 posts 72 karma points
    Oct 31, 2011 @ 16:57
    Dan
    0

    I will once Umbraco v5 becomes the dogs. If only there was an event were people could gather and play or "Hack" (if you will), their way around the v5 alpha.

    Ahh, if only hey :)

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Oct 31, 2011 @ 17:01
    Lee Kelleher
    0

    Oh yes, that would be awesome... like a "hack marathon", or something?

  • Dan 43 posts 72 karma points
    Oct 31, 2011 @ 17:07
    Dan
    0

    Yeah, but with a much better, catchier name.

Please Sign in or register to post replies

Write your reply to:

Draft