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. 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. jobs
    Replies:
    0
    Views:
    814
  2. HP
    Replies:
    3
    Views:
    561
  3. David

    Looping Through Forms: Best Practice

    David, Sep 22, 2003, in forum: Javascript
    Replies:
    4
    Views:
    105
    David
    Sep 24, 2003
  4. Aaron
    Replies:
    2
    Views:
    511
    dhtml
    Apr 10, 2011
  5. Replies:
    5
    Views:
    263
Loading...

Share This Page