Looping through forms on parent page from user control

Discussion in 'ASP .Net Mobile' started by Doug, Sep 15, 2003.

  1. Doug

    Doug Guest

    I've got a user control (.ascx) which sets various properties on
    controls on the parent. It works fine for a specified form.

    I'm trying to make it a bit smarter, specifically for use on mobile
    pages where there are multiple forms, by looping through all the forms
    on the parent page.

    I need something like: foreach(Form frm in Page.Controls) or similar,
    but this just gives me "Specified cast is not valid".

    2 questions:
    1. Can someone help me out with the syntax here?
    2. Is it ok to have user controls on mobile forms or is there some
    "mobile alternative"?

    Thanks!
     
    Doug, Sep 15, 2003
    #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. Mad Scientist Jr
    Replies:
    0
    Views:
    871
    Mad Scientist Jr
    Mar 22, 2006
  2. jobs
    Replies:
    0
    Views:
    914
  3. HP
    Replies:
    3
    Views:
    682
  4. curious
    Replies:
    1
    Views:
    187
    curious
    Dec 5, 2006
  5. David

    Looping Through Forms: Best Practice

    David, Sep 22, 2003, in forum: Javascript
    Replies:
    4
    Views:
    170
    David
    Sep 24, 2003
  6. Otto Wyss
    Replies:
    2
    Views:
    207
    Otto Wyss
    Jan 22, 2007
  7. Aaron
    Replies:
    2
    Views:
    749
    dhtml
    Apr 10, 2011
  8. Replies:
    5
    Views:
    463
Loading...