473,786 Members | 2,350 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Run VB.Net code from simple ASP.net page

ben
All,

What I have:
I have written a VB.net application that uses Access DBs
and Make 100s of Excel documents from the data.

What I need:
I need a Simple ASP.NET Page that will basically pass a
string into a function of the Existing Windows
Application. The app does not run all the time so when
the user opens the ASP.NET page types in a string and
clicks the button it calls a function of the existing
application. I do not have the time or knowledge to
convert all the functions into ASP code. I am assuming
there is a simple way to have the ASP.NET standby while
my app runs its functions.

What I have done:
I have made a simple asp.net page and I can pass strings
into ASP.Net functions just fine. Next I added the vb
module from my windows app into the ASP.NET project. Now
I pointed the ASP button at the main function in the vb
module. I goes through parts of the code until it trys
to open COM objects (Access 10 library).

Questions:
1) am I suppose to add special code to have these
functions run in an offline mode.
2) What is this process offically called? So I can
research this on my own if needs be.
3)HOW DO I GET AN ASP.NET PAGE TO RUN A FULLY FUNCTIONAL
VB.NET APPLICATION!!
Thanks so much,
Ben
be*******@quint on.com
Nov 18 '05 #1
3 2096
Sounds like an interop issue. Did you add aspcompat=true to your @Page
directive?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"ben" <be*******@quin ton.com> wrote in message
news:09******** *************** *****@phx.gbl.. .
All,

What I have:
I have written a VB.net application that uses Access DBs
and Make 100s of Excel documents from the data.

What I need:
I need a Simple ASP.NET Page that will basically pass a
string into a function of the Existing Windows
Application. The app does not run all the time so when
the user opens the ASP.NET page types in a string and
clicks the button it calls a function of the existing
application. I do not have the time or knowledge to
convert all the functions into ASP code. I am assuming
there is a simple way to have the ASP.NET standby while
my app runs its functions.

What I have done:
I have made a simple asp.net page and I can pass strings
into ASP.Net functions just fine. Next I added the vb
module from my windows app into the ASP.NET project. Now
I pointed the ASP button at the main function in the vb
module. I goes through parts of the code until it trys
to open COM objects (Access 10 library).

Questions:
1) am I suppose to add special code to have these
functions run in an offline mode.
2) What is this process offically called? So I can
research this on my own if needs be.
3)HOW DO I GET AN ASP.NET PAGE TO RUN A FULLY FUNCTIONAL
VB.NET APPLICATION!!
Thanks so much,
Ben
be*******@quint on.com

Nov 18 '05 #2
> Does anyone know what the offical MS name is for what I
am trying to do? So I can do some more research.
Interop is the term for working with unmanaged COM and other unmanaged
components.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"ben" <an*******@disc ussions.microso ft.com> wrote in message
news:03******** *************** *****@phx.gbl.. . No, I am net to asp.net(as you can tell). I will try
that out and see what happens.

Does anyone know what the offical MS name is for what I
am trying to do? So I can do some more research.
-----Original Message-----
Sounds like an interop issue. Did you add aspcompat=true

to your @Page
directive?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"ben" <be*******@quin ton.com> wrote in message
news:09******* *************** ******@phx.gbl. ..
All,

What I have:
I have written a VB.net application that uses Access DBs and Make 100s of Excel documents from the data.

What I need:
I need a Simple ASP.NET Page that will basically pass a
string into a function of the Existing Windows
Application. The app does not run all the time so when
the user opens the ASP.NET page types in a string and
clicks the button it calls a function of the existing
application. I do not have the time or knowledge to
convert all the functions into ASP code. I am assuming
there is a simple way to have the ASP.NET standby while
my app runs its functions.

What I have done:
I have made a simple asp.net page and I can pass strings into ASP.Net functions just fine. Next I added the vb
module from my windows app into the ASP.NET project. Now I pointed the ASP button at the main function in the vb
module. I goes through parts of the code until it trys
to open COM objects (Access 10 library).

Questions:
1) am I suppose to add special code to have these
functions run in an offline mode.
2) What is this process offically called? So I can
research this on my own if needs be.
3)HOW DO I GET AN ASP.NET PAGE TO RUN A FULLY FUNCTIONAL VB.NET APPLICATION!!
Thanks so much,
Ben
be*******@quint on.com

.

Nov 18 '05 #3

Not working still. Here is the patch of code that fails. I did add the
references into the project for office 10 and access 10. I did add
aspcompat=true in the @Page directive as well. I still go the same
error. An excpetion string says "cannot create active x component.
Here is a sample from my code.
Dim oAccess As Access.Applicat ionClass

Try
'Start Access and open the database.
oAccess = CreateObject("A ccess.Applicati on")
oAccess.Visible = False

oAccess.OpenCur rentDatabase("c :\Print_Pick_Li st\Pick_List_Lo cal_debug.md
b", False)

Then is jumps to the catch section.

Any sugestions?

Thanks,
Ben

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1630
by: Raymond Cheung | last post by:
On the aspx page, I have the following code <asp:Radiobutton id=heis Text="Yes" Groupname="idiot" checked="true" runat="server" /> &nbsp&nbsp&nbsp <asp:Radiobutton id=heisnot Text="No" Groupname="idiot" runat="server" /> How do I keep track this radiobutton on the code behind page in vb?
3
2089
by: Jeff Cooper | last post by:
Hey Folks, I have a bunch of aspx pages in a solution. One of these pages, call it header1.aspx, has it's code behind in header1.aspx.vb. Another, header2.aspx, has header2.aspx.vb. When I double-click a web control on header1.aspx, it brings me to the code behind for header2! In fact, the code behind page header1.aspx.vb doesn't even recognize the controls on page header1.aspx. BUT, header2.aspx.vb recognizes the controls from...
2
1165
by: Renuka | last post by:
I have one .aspx page which has 2 clickable links going to the same code behind page. Each click must activate diferent functionalities in the code behind page. Can someone help me achieve this. Thanks in advance for your help!
1
3414
by: William Parker | last post by:
I have a web control I made called header.ascx. It has its own properties and methods I defined. But I cannot figure out how to access this control from my code behind page. I can create the web control just fine and script with it as needed from the webform1.aspx page itself just fine, like this: <%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="mysite.WebForm1" %> <%@ Register TagPrefix="uc1"...
7
2244
by: Shapper | last post by:
Hello, When creating an ASP.NET/VB web site I place my code in a code behind page, i.e., aspx.vb. Sometimes I have functions which are common to all aspx files. Is it possible in page1.aspx to use page1.aspx.vb and also a common file named global.aspx.vb which will hold all the functions common to all aspx files in a web site.
7
1753
by: Alan Silver | last post by:
Hello, I have installed the 2.0 framework, and am looking at converting some of my 1.1 pages to use partial classes. I don't (yet) have VS2005, so I'm doing this by hand, but am having problems. I have a simple page that I made in the beta2 version of VWD. The code behind looks like... using System;
14
1738
by: Melanie Avids | last post by:
Hi, I'm tired of banging my head on the computer. I'm hoping someone can help? I have a very small simple page that looks perfect in Firefox, Safari, and Netscape. It's clean. The HTML and CSS both validate. In IE/Mac, however, the container div is significantly smaller, and the content overruns it. In IE/Windows, the content of the right column only starts displaying after the contents of the left column are completed. I have SCREENSHOTS...
0
844
by: Slim | last post by:
I have a simple page with a button. when the button is clicked it creates a new button, all works fine so far When the second button is clicked it should create a third button, but this is where it fails. How should I go about getting this to work
6
1819
by: Charles Packer | last post by:
I put up a simple page of thumbnails linked to photos that come up in a separate window at http://cpacker.org/trainwreck and my audience reamed me out for not accommodating browsers with Javascript turned off. Could somebody point me to a tutorial or FAQ list that shows how to default to standard HTML in a simple case like this?
5
1590
by: Ashlewis | last post by:
Hi all, I have two aspx pages: Default.aspx with its code behind page of Default.aspx.vb Home.aspx with its code behind page of Home.aspx.vb The Default page in effect is just a template, the Home page will be the same but with some extra functionailty. I dont want to have to copy the code from the Default.aspx.vb to the Home.aspx.vb page since I assume there is a more efficient way. Ive tried to inherit the Default code into the Home...
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9492
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10360
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10108
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7510
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6744
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5532
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4064
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3668
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.