Thanks people - your feedback is excellent.
The key was what type of collection it was - a control collection not a DropDownList collection.
Thanks again,
James
Hi I've got the following loop:
foreach (DropDownList ddl in myPanel.Controls)
{
ddl.ClearSelection();
}
I keep on getting a cast error, saying that it can't cast to DropDownList. I know there are DropDownList controls within the panel I am looping thru, as I have debugged and seen...
Hi there,
I want to encapsulate a db connection into a class and then have a static method within this class that returns an open connection to a database.
I want to know if the connection is closed properly, as the method returns the connection before the closed() command is called. Here is...
Hi I'm trying to set the visible property on all panels on my page.
Is this possible using a foreach loop?
I have tried using the following but it doesn't work:
foreach (Panel p in Page.Controls)
{
do something
}
Does anyone know where I am going wrong?
Cheers, JAmes
Hi,
I have a Stored Procedure that takes a very long time to run, I'm getting a problem that I think is due to the connection to the DB timing out. Is there a default amount of time after which the connection times out if no result is given from the SQL server?
If so, how can I change this...
Hi,
I have a workbook which I open using a macro, and I need to tell whether the workbook has been opened by the macro (in the first workbook) or by the user manually...
Is there an easy way of doing this within the Workbook_Open() method
Thanks,
James
Hi,
Is there anyway to stop a macro from running in VBA/Excel?
The only thing I can find is Application.Quit but I don't want to close the Workbook...
James
Hi,
I want to embed HTML within my XML document. Due to the tags, HTML causes the XML parser not to function... One way round this is to use the HTML entities instead (e.g. <).. is there anyway to automatically convert HTML tags into their entities?
Cheers
James
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.