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
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...
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...
Hi,
I'm pulling a date from a SQL Server and putting it in a bound column of a DataGrid. I set the data formatting expression = {0:yy-MM-dd} but the date still displays in long form with Time included.
Any body know why this is happening?
James
Hi I'm trying to concatentate two varchar fields together in a query but it returns null always. Below is the code:
SELECT source + ' (' + card_digits + ')' AS reference FROM myTable
Any ideas?
Thanks, James
Hi,
I want to know if there is a drop in performance when creating a table and all it's child elements (rows, cells) at RunTime using the .net objects provided, compared to HTML tables and inserting data within them.
James
Hi,
I want to update 1 record in a table based on a where clause that will return more than one record.
I suppose it is similar to a SELECT TOP 1 field FROM table statement.
Does anyone know if it is possible to use the TOP keyword or is there a more complicated way of doing it?
Thanks
James
Hi,
Is there a way in the group by clause to group records into max of three records?
i.e. there may be more than 3 records belonging to that group in the query but I only want to see the top 3.
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.