ActiveX Control to read URL properties

Question:
I have a VB database application that, when I pass a unique id to a client object, opens that record (this explanation is simplified). I have to write an ActiveX control of some type that accepts a URL, so I can parse out what I need and pass it to the control?which then calls my database application.

I need it to be a client-side control because my database app runs on the client. The reason for passing the record id as a URL is that the message is generated on a seperate server and is mailed to the user.

So, what do I need to do to enable an ActiveX control to see the URL that called it (and is it possible to parse out the contents of the URL)? My other thought was to create parameters on the control and set them when the page is called, but I don’t know how to do that.

Answer:
From your question, I gather you are passing a URL with a primary key that is being passed to a Web server which returns a page containing an ActiveX control. You would like the ActiveX Control to look up a record from a database based on the primary key passed into the page. A simple solution is to place the control in an ASP page. The ASP page’s Request object has a QueryString property that returns the query string part of the URL.

In order to parse the query string to return on a specific namevalue pair you can pass the name of the pair to the QueryString property. For example, suppose the URL is www.Flashcreative.comsome.asp?name=mike&id=123. In the ASP page you can retrieve the value of the id variable with Response.Querystring(“id”). Once you’ve retrieved the value of the Primary key, you can simply set the property of the control within the HTML that is sent to the browser.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

The Latest

iOS app development

The Future of iOS App Development: Trends to Watch

When it launched in 2008, the Apple App Store only had 500 apps available. By the first quarter of 2022, the store had about 2.18 million iOS-exclusive apps. Average monthly app releases for the platform reached 34,000 in the first half of 2022, indicating rapid growth in iOS app development.

microsoft careers

Top Careers at Microsoft

Microsoft has gained its position as one of the top companies in the world, and Microsoft careers are flourishing. This multinational company is efficiently developing popular software and computers with other consumer electronics. It is a dream come true for so many people to acquire a high paid, high-prestige job

your company's audio

4 Areas of Your Company Where Your Audio Really Matters

Your company probably relies on audio more than you realize. Whether you’re creating a spoken text message to a colleague or giving a speech, you want your audio to shine. Otherwise, you could cause avoidable friction points and potentially hurt your brand reputation. For example, let’s say you create a