Itemplate not accepting postback in data-bound templated control

Discussion in 'ASP .Net' started by cosine... zero, Jun 9, 2004.

  1. Hi!

    I've got a databound templated control that I want the itemplate class
    itself to be postback aware to process form data.

    But calling Page.RegisterRequiresPostBack( instantiatedtemplate ) doesn't
    seem to force a postback. I've put this in OnInit, OnPreRender, OnLoad...
    nothing.

    Currently I'm trying this:

    'CreateChildControls
    Dim EditControl As New EditForm
    EditRecord.InstantiateIn(EditControl) 'Edit Record is the Itemplate
    property
    EditControl.DataItem = Me.DataItem
    Controls.Add(EditControl)
    Page.RegisterRequiresPostBack(EditControl)
    EditControl.DataBind()


    Still nothing. Is there any reason why an ITemplate couldn't be registered
    for postback in this manner (or in OnInit, etc)?

    Thanks!

    Jim Ankrom
     
    cosine... zero, Jun 9, 2004
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Luhar Powell via .NET 247
    Replies:
    0
    Views:
    2,588
    Luhar Powell via .NET 247
    Apr 1, 2005
  2. Mario Krsnic
    Replies:
    0
    Views:
    560
    Mario Krsnic
    Jun 23, 2006
  3. cindy
    Replies:
    0
    Views:
    960
    cindy
    Dec 9, 2009
  4. joe_s

    Templated data-bound server control design question

    joe_s, Jul 24, 2003, in forum: ASP .Net Building Controls
    Replies:
    4
    Views:
    278
    joe_s
    Jul 25, 2003
  5. news.microsoft.com

    Templated Data-Bound Control Sample

    news.microsoft.com, Aug 20, 2004, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    292
    Sam Fields
    Aug 20, 2004
  6. Manu

    Data Bound Templated Control - design time problem

    Manu, May 22, 2006, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    187
  7. Brook

    Custom Control, ITemplate and nested bound controls

    Brook, Mar 17, 2008, in forum: ASP .Net Web Controls
    Replies:
    4
    Views:
    679
    Brook
    Mar 25, 2008
  8. cindy
    Replies:
    0
    Views:
    905
    cindy
    Dec 9, 2009
Loading...