Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP + Visual Basic

Status
Not open for further replies.

LalanKG

Programmer
Jan 25, 2005
23
0
0
IN
Hi ,
I am new to Visual basic. I have some requirement in intergrating VB with ASP page.
The requirement is ,assume I have a html form, in that i have a two txt box and one button.

On clicking the button i need to pop up a visual basic form (external) and prepopulate
these txt box values(html page) in the new VB form.

I am using VB 6 and ASP and not .NET

Please help me, is there any way.. any third part control or so..pls let me know

Thanks in advance
Lal
 
You should do this with a separate web page. You can't integrate VB executables and HTML the way you described.

Lee
 
You should do this with a separate web page. can you make it more clear..

Lal
 
Put your text boxes on an HTML page that pops up and prepopulate them using ASP.

Lee
 
Lee,
I think you did not got my qs..
let me more try to make it more clear.
"
I have two independant application one in VB and the other in ASP.
I need to get some data which exists in the ASP page and on clicking one button in
that HTML form , shud pop up a Visual basic(exe) form and get some of the values in that ASP form
and populate the VB form.

Its some what like an intergration between ASP and Visual basic.
 
ASP and Visual Basic don't mix the way you described. If you're running a web server, you can use CGI executables written in VB to create web pages, but that's completely different from what you want to do.

Lee
 
Its some what like an intergration between ASP and Visual basic
You could rewrite your VB6 app as a ISAPI DLL, But as Lee explained you can't mix HTML and running an exe files

Chris.

Indifference will be the downfall of mankind, but who cares?
Woo Hoo! the cobblers kids get new shoes.
Nightclub counting systems

So long, and thanks for all the fish.
 
Well I think you should have it on another web page if you can.

But it is totally possible to do it your way and no, you don't need an ISAPI DLL.


1. Change the project type of your Standard VB EXE into an ActiveX EXE.

2. Add a public createable class module.

3. Add to this class a Public Property Let method for each value you want to move between your web page and your EXE.

4. Add to this class a Public Sub that you will use to show the form in the EXE.

5. Edit the Sub Main() of your EXE to check the start method of your application. If it is started by "Automation" then do not load the main form, or load it but keep it hidden until the Sub from step 4 above is called.

6. Make sure all of your users have the new version of your EXE registered on their systems.

7. ...

8. Profit!
 
Oh yeah, I forgot to mention that once you've converted your EXE you then use client-side script (VBScript or JavaScript) to create an instance of its publicly createable class.

So this really isn't an ASP question, it is a regular VB question together with client scripting.
 
it is a regular VB question together with client scripting"
I should have print like that.
Any way,I am trying to work out with Sheco's comment..

myself Newbie na... may takes some time ;)

Lal
 
Thanks Sheco,

How can I create an instance of this publicly createable class from VBScript.. any sample code or so?

Lal
 
Well, lets just suppose you are using client side VBScript...

Set myLocalObjectVar = CreateObject("Project.Class")

myLocalObjectVar is the name of your variable in the VBScript

Project is the name of your ActiveX EXE

Class is the name of the publicly createable class within that ActiveX EXE
 
Aren't you to the point yet where you do the research yourself with some online tutorials or books? From what I've seen, usually after 6 or 7 posts if the person who created the original post still has questions, they're in over their head and need to sit down, do some research, study and experiment on their computer before coming back to ask questions.

Lee
 
all,
Thanks for ur support I am now able to call VB form from html page and pass values to it..

But now ran into a common error. Whn the page is trying to access the VB ActiveX component it is now showing an alert..
"An activeX control on this page might be unsafe to interact with othe parts of the page .."..

so i did some trial and error like in IE
Tools | Internet Options | Security | Custom Level | ActiveX controls and
plug-ins.
(In IE 6.0) Some of those are set to "prompt" in your browser. Set them to "Enable" ..

But still that Alert is comming...

Any thoughts..

Lal
 
and you know what it's trying to do, put yourself in the place of a user who has arrived on your site. Which button are you going to click next?



Chris.

Indifference will be the downfall of mankind, but who cares?
Woo Hoo! the cobblers kids get new shoes.
Nightclub counting systems

So long, and thanks for all the fish.
 
hi Again,
Is there a similar way to reverse the precess.
I have data in Visual Basic, I need to populate these values to an HTML page.. reverse intergration ..

Hope to hear from you all,
Thanks in advance

Lal
 
Please clarify the operating environment.

The VB app running on a machine and ...

You wish to open a new web browser window?

Or you wish to detect a running instance of the browser and insert something into it?

Or you wish to detect a running instance of the browser that is already navigated to a particular page and then insert something into that?

Or is the browser integrated into your VB app?

Or does your App run on a web server?

Or what?

 
1. You wish to open a new web browser window..
2. You wish to detect a running instance of the browser that is already navigated to a particular page and then insert something into that.

These two are the initial requirements.

LalanKG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top