Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Mobile > Looping through forms on parent page from user control

Reply
Thread Tools

Looping through forms on parent page from user control

 
 
Doug
Guest
Posts: n/a
 
      09-15-2003
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!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
looping in array vs looping in a dic giuseppe.amatulli@gmail.com Python 5 09-20-2012 11:58 PM
looping through json array loops through the characters instead ofthe values Aaron Javascript 2 04-10-2011 05:58 PM
If a class Child inherits from Parent, how to implementChild.some_method if Parent.some_method() returns Parent instance ? metal Python 8 10-30-2009 10:31 AM
Page load of the parent page called twice when a modal dialog is opened from a button click of the user control on the parent page Samy ASP .Net 2 08-15-2005 03:30 PM
Looping Through Forms: Best Practice David Javascript 4 09-24-2003 04:16 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57