Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

create com dll with c# and raise vb event

Posted on 2013-11-15
8
Medium Priority
?
538 Views
Last Modified: 2013-12-06
I need to create a dll with c# that is com visible so that I can use it in a web page  using the <object> tag.  This dll will also have to raise events in vbscript, so that the web page can get the event (the web page is old asp).  

I can write the dll, but how do I get it to raise a vbscript event?
0
Comment
Question by:dhenderson12
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 34

Expert Comment

by:Big Monty
ID: 39651436
is this what you're looking for?

http://forums.asp.net/t/1442595.aspx
0
 
LVL 34

Accepted Solution

by:
Big Monty earned 1200 total points
ID: 39651760
more specifically, if you look at the post by kossovsky, you'll see a good example on how to build the DLL, register it, then call it from an asp page:

Set Base64 = CreateObject("ComComponent.Base64")
Result = Base64.Encode("some string to encode")
0
 

Author Comment

by:dhenderson12
ID: 39651763
yes, but it doesn't show how to raise an event.  I need to be able to respond to events from my web page with a vbscript function.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:dhenderson12
ID: 39652167
I guess I should rephrase my response:  I need the web page, via vbscript, to respond to events raised from my com object.  Hope that makes more sense.
0
 
LVL 29

Expert Comment

by:Göran Andersson
ID: 39686866
Web pages doesn't work that way. All events come from the browser. If there is no request to the server to return a page, there is no code running in your web application.

What specifically is it that you are trying to accomplish that you though creating events from the server side would solve?
0
 
LVL 51

Assisted Solution

by:Ted Bouskill
Ted Bouskill earned 800 total points
ID: 39687708
I'm going to repeat GreenGhost's comment another way with some differences.

A web server can run events in many web server languages as can a copy of a page with JavaScript in the browser.  However, the server events only fire when the browser requests the page.

Remember, a web browser requests a web page using the URL in the address window.  The web server receives the URL request and then fires server code and logic to then transmit the page back to the browser.  As the page is being rendered on the browser JavaScript can begin to execute as the page is loading based on how it is inserted in the page.  Once the full response has been sent to the browser from the server, they disconnect from each other.

The server cannot push events back to the browser.  The browser using JavaScript timers can poll the server without refreshing the entire page, however, the web server only responds to requests from the browser.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question