473,480 Members | 2,001 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

will the page having frames cause this to fail?


i have the routine setup as below. the ctlCollection is populated with
Page.Controls. but it only ever brings back 3 controls even though there is
more than this on the page

the control types it returns are

1 x "System.Web.UI.ResourceBasedLiteralControl"
1 x "System.Web.UI.HtmlControls.HtmlForm"
1 x "System.Web.UI.LiteralControl"

if it is the frames that are causing the problem is there any other way
around it?

Cheers,
Craig
Private Sub SetBackgroundColour(ByVal ctlCollection As ControlCollection)

Dim ctl As Control

Try

For Each ctl In ctlCollection

If ctl.GetType.ToString = "Textbox" Then

If CType(ctl, TextBox).Enabled = False Then

CType(ctl, TextBox).BackColor = Color.Transparent

Else

CType(ctl, TextBox).BackColor = Color.LightGoldenrodYellow

End If

End If

If ctl.GetType.ToString = "DropDownList" Then

If CType(ctl, DropDownList).Enabled = False Then

CType(ctl, DropDownList).BackColor = Color.Transparent

Else

CType(ctl, DropDownList).BackColor = Color.LightGoldenrodYellow

End If

End If

Next

end sub
Nov 19 '05 #1
0 831

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
23269
by: Mimi | last post by:
Hello, I am having trouble using the session vars in PHP 4.3.9 OS: Win XP Prof Web Server IIS (is local and there are no links to other servers from the web pages I work on) Browser: IE 6.0 ...
2
11157
by: Alex Hunter | last post by:
Is it possible for one page to access a variable (or text) from another page or frame? How is this done? I want to update a piece of data on one page, and have it update on lots of different...
4
1328
by: Andrew Poulos | last post by:
How can a page know which frame in a frameset it is in? Andrew Poulos
25
43163
by: Steal | last post by:
Hi at all I try to validate this page using the link: http://validator.w3.org/ but it return that this is not a valid HTML 4.01 page please where is it error? Steil <!DOCTYPE HTML PUBLIC...
11
461
by: Fred | last post by:
I have an aspx page: Main.aspx which has several components that cause a postback. In the page Main.aspx I also have an iframe which contains a multi-page pdf file. The problem I am facing is...
2
7103
by: Pramod | last post by:
Hello All We have application here. That utilizes the CrsytalReport.net. We have initial version installed on Production server where all report pages opening fine. Now we have added some changes...
0
1156
by: TNRBala | last post by:
I'm using ASP.NET to build the Web Application, In my project, I'm having Login page, having no frames. I'm entering the user name & password, and am redirected to next page, that page contains three...
11
2889
by: tdmailbox | last post by:
I have a website that I subscribe to that allows me to track tasks. I have an extra computer with a big monitor that i want to always display the task list. the problem is after so many hours I...
0
7048
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7050
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
6966
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5344
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4488
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2999
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1303
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
564
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.