Click here to Skip to main content
14,125,060 members
Click here to Skip to main content
Add your own
alternative version


22 bookmarked
Posted 24 Jan 2006

DataLink Dialog from ASP

, 24 Jan 2006
Rate this:
Please Sign up or sign in to vote.
An ActiveX control that allows ASP users to display datalink dialogs.

Sample Image


This ActiveX control allows the user to build a connection string from the data providers listed on a client machine. The ActiveX invokes the standard DataLink dialog that lists all the data providers and the parameters needed for a valid connection string. This dialog also tests the connection.

Using the code

  • dl: the ActiveX object that displays the DataLink dialog.
  • OpenDl: Opens the DataLink dialog.
  • connectin: string returned by the DataLink dialog.

VBScript is used for calling the ActiveX control methods.

    <title>Test Datalink Dialog from .Net</title>
  <meta content="Microsoft Visual Studio .NET 7.1" 

  <meta content="C#" name="CODE_LANGUAGE">
  <meta content="JavaScript" name="vs_defaultClientScript">
  <meta content="" 

  <script language="vbscript">
    Sub cmdChange_Click        
      document.forms(0).txtConnectionString.Value = _
    End Sub
  <body MS_POSITIONING="GridLayout">
    <OBJECT id="dl" codeBase="dl.CAB#version=1,0,0,0" 

      height="0" width="0" 


    <PARAM NAME="_ExtentX" VALUE="26">
    <PARAM NAME="_ExtentY" VALUE="26">
  <form id="Form1" method="post" runat="server">
    <asp:TextBox id="txtConnectionString" 

    style="Z-INDEX: 101; LEFT: 16px; POSITION: absolute; TOP: 64px"

    <INPUT TYPE="button" id="dlName2" 

    NAME="dlName2" VALUE="test" OnClick="cmdChange_Click"

    style="Z-INDEX: 102; LEFT: 176px; POSITION: absolute; TOP: 64px">
    <asp:Label id="Label1" 

    style="Z-INDEX: 103; LEFT: 24px; POSITION: absolute; TOP: 32px" 

    runat="server" Width="344px" 

    Font-Size="Larger">Datalink Dialog</asp:Label>

Points of Interest

ActiveX is a complete new world for me. I am a hardcore .NET programmer. I used to dislike VB 6, but I have to admit, it is great for creating ActiveX controls. They provide full system access. A little risky if run over the Internet, but in specific environments (like intranets) they could be quite useful.


So far this is the first version, it was made for a specific client need. There are tons of improvements that can be made, however I don't have the time right now.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Aj Horus
Web Developer
Panama Panama
No Biography provided

You may also be interested in...

Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web03 | 2.8.190518.1 | Last Updated 24 Jan 2006
Article Copyright 2006 by Aj Horus
Everything else Copyright © CodeProject, 1999-2019
Layout: fixed | fluid