Accessing textboxes from ascx control on parent page

Discussion in 'ASP .Net' started by mollyf@hotmail.com, Apr 29, 2005.

  1. Guest

    I have multiple user controls on a form. I have a save button on each
    control so the users can save as they go and on the parent form, I have
    another button which will save/update everything entered in on the user
    controls. My problem is that I cannot access the different controls on
    the user control. I changed the "protected" to "public" for each
    textbox that I'm wanting to "see" in the parent form. In my parent
    form, I have Protected WithEvents RecipInfo As ctrlRecipInfo (with
    ctrlRecipInfo being the control I want to access). I can see each of
    the textboxes in my parent form but when I execute the code, I get
    "Object reference not set to an instance of an object." as soon as it
    gets to RecipInfo.txtFName.Text.

    Obviously RecipInfo isn't an instance of the object ctrlRecipInfo but I
    have no idea of where and how to do that.

    Thanks.

    Molly J. Fagan
    Oklahoma Foundation for Medical Quality
     
    , Apr 29, 2005
    #1
    1. Advertising

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. Quentin
    Replies:
    1
    Views:
    489
    Quentin
    Jul 29, 2003
  2. Jason Shohet
    Replies:
    1
    Views:
    484
    Kevin Spencer
    Nov 10, 2003
  3. Holger (David) Wagner
    Replies:
    2
    Views:
    1,943
    Holger (David) Wagner
    Jul 3, 2004
  4. jaffarkazi
    Replies:
    1
    Views:
    561
    Teemu Keiski
    Jun 17, 2008
  5. Joe
    Replies:
    1
    Views:
    374
    Jeffrey Tan[MSFT]
    Feb 16, 2004
Loading...

Share This Page