Connection Strings Tip

Really neat trick using MDAC (Microsoft Data Access Components) to create connection strings for various data types.

1. Create a new text file somewhere useful and rename it xxxx.udl

2. Double click on the file to open it.

3. Now your looking at the ‘Data Link Properties’ dialog box

4. Pick your connection details and click ok.

5. Open the file in a text editor (Notepad++!!!) and grab your complete connection string.



IE Rubbish!

I just can’t get over this!! Whilst working on a VS2005 C# project at work to create a web interface for one of my employers systems I encountered something I just couldn’t believe. As part of the design aspx file VS2005 provides for outputting A GridView with a property of [RowStyle-Wrap=”false”] which basically tells the GridView to only have one line of text in any table cell on output.

Basically a GridView is rendered to an HTML Table at runtime on the client-side browser. Anyway, adding the [RowStyle-Wrap=”false”] property renders this [white-space:nowrap;] in the style declaration of each table row. The kicker is that … IE ignores this white space CSS tag and wraps the row anyway. Unbelievable. I’m testing this interface in both IE and Firefox … Firefox responded as expected and put the whole row on one line in the scollable panel.

In order to get the same effect in IE (and present the user with something half useable) I’ve more or less had to break the HTML table by adding in an event like:

foreach (TableCell cell in e.Row.Cells)
if (cell.Text.Length > 0)
cell.Text = “<nobr>” + cell.Text + “</nobr>”;

This is just laughable, utterly laughable. Microsoft web development software formatting web pages that IE can’t render properly. Go Microsoft!!