How to read Web.Config

rosdi | .NET, Tips | Sunday, February 25th, 2007 |

If you are wondering how to read Web.Config file programatically in your code, use ConfigurationManager.

Shown below is how I retrieve ConnectionStrings from Web.Config.

[VBNET]
Dim connectionString As String
connectionString = System.Configuration.ConfigurationManager.ConnectionStrings(”YOUR_CONNECTION_NAME”).ConnectionString
[/VBNET]

How to change Visual Studio 2005 default web browser

rosdi | .NET, Tips | Saturday, May 6th, 2006 |

Set Visual Studio 2005 default browserVisual Studio 2005 detects your computer’s default browser during installation and will automatically set its browser to that (IE or Firefox or whatever).

There is no obvious way to change this. It is not even listed in the Option menu.

The only way to change VS2005 default browser is to right click on one of your .aspx file, and then select ‘Browse With’. From there you can choose the browser of your choice and make it the default.

I chose internal web browser as the default as this will greatly speed up by code and debug cycle.

Possibly related: I am not selling | 

How to selectively embed/link Visio diagrams into Word

rosdi | Others, Tips | Friday, April 14th, 2006 |

Say you have ten or twenty pages of Visio diagrams nicely formatted and laid out, and you want to insert these diagrams into Word. But you also want to make sure any changes you may made to the Visio diagrams later will be automatically reflected into Word.

To make the matter worse, you want to insert each of these Visio diagrams at several different places in the Word document.

  • You have several pages of Visio diagrams that you have spent days designing.
  • These diagrams must be inserted into Word at different places/pages.
  • Any adjustment to the Visio diagrams should be reflected automatically into Word.

How do you that? Insert Object in the Tools menu in Word won’t work because that will link THE ENTIRE Visio pages! You want to selectively insert a certain diagram at a certain place.

The trick is to group these diagrams so that they are grouped into individual diagram, then with one of the grouped diagram selected, click Edit, and then Copy.

Group first, and then copy (Ctrl-C)

In Word, click Edit, click Paste Special, click ‘Paste Link’ radio button, then make sure the format is Microsoft Visio, then click OK.

Click Edit, Paste Special

The selected Visio diagram will be pasted into Word and any changes made to the original diagram will be reflected in Word as well.

For more detailed explanation, go to:

http://office.microsoft.com/en-ca/assistance/HA011822511033.aspx#3

Hope this helps someone.

Possibly related: None | 


Buy Domain Name: Malaysia Domain Name | Powered by WordPress | Theme by Roy Tanck | Googlebot never visited this page