.NET version of "ActiveX" ?

A

Andrew

Hi all,

I am still getting into ASP/VB.net and have a concern about something I
see coming. Currently our entire website is classic ASP, yet the feelings
from on high is that we need to start looking into updating the site to
ASP.net. For the most part I am in favor of this, but I am concerned about
the ActiveX objects we are using. For example:
I needed to provide the means for a user to upload multiple files via a
webpage. To avoid issues with the HTML Form Input "File" tag, or using
expensive third-party controls, I simply wrote one in VB6 that could be
inserted directly into the ASP page. The secondary reason for this is that
there was no other way to see the files on the users computer -- VBScript or
JavaScript could only see files on the webserver. The user could then
select files needed, click a button, and whala...good to go.
But my question is, what do I do in ASP.net to replicate this? I
suppose I could use the same ActiveX Object, but I am thinking there must be
a .net solution, yes?

As I said, I am still getting my head around all the new (to me) stuff
in ASP.net, and would just like to know where/what I should be looking into
so I don't get off on a tangent. I know we will be updating our site, and I
would just like to be as prepared as I can be when that time comes.

Thanks!

-- Andrew
 
J

John Saunders

Andrew said:
Hi all,

I am still getting into ASP/VB.net and have a concern about something I
see coming. Currently our entire website is classic ASP, yet the feelings
from on high is that we need to start looking into updating the site to
ASP.net. For the most part I am in favor of this, but I am concerned about
the ActiveX objects we are using. For example:
I needed to provide the means for a user to upload multiple files via a
webpage. To avoid issues with the HTML Form Input "File" tag, or using
expensive third-party controls, I simply wrote one in VB6 that could be
inserted directly into the ASP page. The secondary reason for this is that
there was no other way to see the files on the users computer -- VBScript or
JavaScript could only see files on the webserver. The user could then
select files needed, click a button, and whala...good to go.
But my question is, what do I do in ASP.net to replicate this? I
suppose I could use the same ActiveX Object, but I am thinking there must be
a .net solution, yes?

As I said, I am still getting my head around all the new (to me) stuff
in ASP.net, and would just like to know where/what I should be looking into
so I don't get off on a tangent. I know we will be updating our site, and I
would just like to be as prepared as I can be when that time comes.

Client-side processing doesn't really change much with .NET. Your ActiveX
control is client-side, so you could go right ahead and use it.

The file input control in ASP.NET only handles a single file at a time. I
have seen a third-party control which does multiple files at a time, but I
don't recall who sells it. I also saw some client-side JavaScript which did
the same thing. It worked by adding a new <input type="file"/> element each
time the last one was filled in. It gave sequential names to the controls it
created, so the server side could just process file0 through file<n>.
 
A

Andrew

John,

I understand that the File Input control is virtually no different
than that of classic ASP. This is the reason I wrote the VB6 ActiveX
Control in the first place. I did not want to use this control, I didn't
want to come up with javascript to put multiples of it on a page, and I did
not want to pay someone else money when I could write something myself. Let
me put it this way...the user could upload 1 to 15,000 files, and I would
never have any knowledge what it would be. Requiring that person to fill in
even 20 File Input boxes is unthinkable. The ActiveX contol provides the
means to multiple select, navigate directory structures, all while proc
essing the files as they come up, and dumps data directly into a database.
But this is irrelavent to my question.

ActiveX in VB6 provided me the means to place computing power onto the
client side while maintaining a link to the server side -- upload a file,
process the contents, and submit to a database -- all without having to
cause a page reload or refresh. The control could accept some client side
properties, and fire events that client side JavaScript could act upon (like
sending the user to another page when its task completed).
Forget what the lines of code will be doing....My question is simply how
do I do/create/make use of "ActiveX" style controls in ASP.net?

-- Andrew
 
J

John Saunders

Andrew said:
John,

I understand that the File Input control is virtually no different
than that of classic ASP. This is the reason I wrote the VB6 ActiveX
Control in the first place. I did not want to use this control, I didn't
want to come up with javascript to put multiples of it on a page, and I did
not want to pay someone else money when I could write something myself. Let
me put it this way...the user could upload 1 to 15,000 files, and I would
never have any knowledge what it would be. Requiring that person to fill in
even 20 File Input boxes is unthinkable. The ActiveX contol provides the
means to multiple select, navigate directory structures, all while proc
essing the files as they come up, and dumps data directly into a database.
But this is irrelavent to my question.

ActiveX in VB6 provided me the means to place computing power onto the
client side while maintaining a link to the server side -- upload a file,
process the contents, and submit to a database -- all without having to
cause a page reload or refresh. The control could accept some client side
properties, and fire events that client side JavaScript could act upon (like
sending the user to another page when its task completed).
Forget what the lines of code will be doing....My question is simply how
do I do/create/make use of "ActiveX" style controls in ASP.net?

For one thing, you can use ActiveX in exactly the same way as before.

For another, you can embed Windows Forms controls into a web page. I'm
afraid I can't find a reference to that, though.
 
N

Natty Gur

Hi,

As John said you can download .net assemblies to the client side. Those
assemblies can be windows user control embedded in your page, DLL with
inner functionality and even Exe. IE can host CLR application and got
build in mechanism to download those assemblies.

You just need to remember that this method required installation of CLR
on clients machine.

The following link is good start :
http://www.eggheadcafe.com/articles/20021205.asp

If you need any help regarding this issue feel free to e-mail me.

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,731
Latest member
MarcyGipso

Latest Threads

Top