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
...= _
"Server=IREA1SQLP100;" & _
"DataBase=dsw_ecfilter_mk_delta;" & _
"Uid=ecfilter_mk_delta_user;" & _
"Pwd=er5t6*3B"
Dim scnnDelta As New SqlConnection(SQL_CONNECTION_STRING)
Thanks,
James
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
Hi,
I have the following script setup:
<script language=javascript src=myfile.js>
myVar1 = "test";
</script>
within myfile.js the script references myVar1, but when i run the script IE says it can't find the variable. Am I doing anything wrong, if so is there a work-a-round...
Hi I'm using the mail object to send an email but am receiving am catching an error... I'm using the following code:
try
{
SmtpMail.Send(newMail);
}
catch (Exception exError)
{
return exError.ToString();
}
The code above is raising the following exception:
Could not access...
Paul,
This turned out to be one issue, so thanks. However, another problem that was hidden; in the page load I was always rebinding the datagrid to the original data fetch. Instead I needed to implement a isPostBack test. This fixed this problem.
Cheers
James
Hi,
I have a button in my datagrid, and an event handler for it which calls a function.. Only the eventhandler never calls the function, (or possibly the eventhandler never captures the button being pressed). Has any body had any similar problems or can anyone see any problems with my code...
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.