I've just found out that you're able to run dll's or .NET Framwork components using ASP.NET's server.createObject(progId).
After searching the internet I find this:
"progID - Specifies the type of object to create. The format for progID is [Vendor.]Component[.Version]. "
Now what's "[Vendor.]Component[.Version]"!? If I've created a VB.NET Windows Control Library compiled download forexample myControl1.dll, how do I know what to type as prodId? The class name? Should I add namespace (don't quite understand what this is)? Please help!Hmm! What if I've created a Windows Control Library with buttons and labels and so on, and I like to start this DLL from a Visual Basic ASP.NET Web Application. Will I be able to see theese buttons and labels that I've created only by write "dim blabla as new myWindowsControlLib" !? I didn't get it to work. I compiled the Control Library that I named myControl (it contains absolutley nothing but a button, I added no code what so ever) and copied it to the bin dir of the Web Application just as you told me.. When writing dim x as new myControl nothing happend. BUt I added myControl.dll as reference and then I found myControl in the popup list of available things you can choose from when typing "new". But it still wouldn't work though, i tried both "dim x as new myControl" and "dim x as new myControl.UserControl1()" but the things after new gets a blue underline indicating that something is wrong.
Actually all you need to do is..compile the dll, put it into your ASP .NET application bin directory, then instatiate it like any other control..
Dim A As New Yourdllsclass
nothing special here.
you can create web form controls that create regular html controls, but you cant use windows forms controls.
ok that makes sense. I'm just wondering where you create Web form controls!? Is that the same as Web Control Library? I really don't like to use Web Control Libraries since they seem very hard to work with (I need to have lots of graphics, like buttons and so on, and I also need some activex components) , atleast for me who's not used to html (or asp for that matter). It would be so much easier if you could just draw things to a form just as you can do with windows control libraries. But I havn't found a way to do this with web control libraries. Or mabey Web Form Controls is something else than Web Control Libraries? Or mabey the dll's you're using in ASP.NET aren't supposed to be of graphical character? Are they just supposed to be "simple" classes containing no graphics? What if I like to reuse a whole ASP.NET Web Application then with graphics and everything, just like an activex component, is that possible?
nah cant really do that...if you make your own web form control, it will be a composite of html controls generated by your code. REmember that all ASP does is generate a final html document and sends that to a client. A web brower wouldnt understand your code for drawing a non html control as web browsers only understand html. They never see your asp .net code.
btw...the term 'Control Libraries" you keep using..just through that out. That terminology is not valid for .NET. You have Web Form Controls and Windows Forms Controls...those are the correct terms.
But you can use graphical web controls that are included in .NET, like for example a button, and draw it to the grid of the ASP.NET web application. I mean, if that's possible, why isn't it possible to create web controls libaries or similar containing for example a "web button" and a activex control and save this to a new web control library that you add to the component box and later can use in your ASP.NET Web application. Just like a windows control library or activex would do on a normal form.
"But you can use graphical web controls that are included in .NET, like for example a button, and draw it to the grid of the ASP.NET web application"
But all those do is create an html control. Look at the source for the web page you create within your web browser and you will see it is nothing but html.
Well that makes sense aswell then :). But then again it would be possible if web form controls used then same thing as ASP.NET Web Application does - a grid. (The web form control could then just translate the button into html just like ASP does?). Gah... This is really killing me. All I want to do is to find a way to create a control or something that contains for example a textbox and button and save this as ONE object instead of two seperate! (For recycling purposes). This "object" must also be runnable from a webbrowser.. Is this impossible using VB.NET? Do you have to switch back to VB6 activex programming?
Saturday, March 24, 2012
server.createObject(progId) <- what is progId
Labels:
asp,
components,
createobject,
dll,
framwork,
lt-,
net,
progid,
run,
server,
servercreateobject
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment