Tech Off Post

Single Post Permalink

View Thread: Accessing a .NET dll in a HTML page
  • User profile image

    , MarDude wrote


    I am trying to provide an alternate front end to our ERP application.  This would require accessing the .net dlls from a browser.  I thought making a user control to wrap the objects in would work, but I can not get it to display. 

    I created a usercontrol with a textbox and a button.  I then checked the property "Register for COM interop".  I used the following code (with the dll copied to the same folder as the html file) but the usercontrol does not display.

    <object id="UserControl"
    height="300" width="300">

    I then followed this link Cannot Host .NET User Controls in Internet Explorer and ended up with this:

    <OBJECT ID="UserControl1" CLASSID="CLSID:9F769412-6736-39DD-9B29-DEF814E32B26" CODEBASE="rotWI_ShopDataMaintenance.dll#-1,-1,-1,-1" height="300" width="300">

    I am currently trying to determine what classid was assigned to my user control.  It did get farther, asked me to install something, but again, nothing happened.  I changed the classid to one I found in AssemblyInfo.vb but this did not help.

    I also tried fully qualifying the name, using a relative path and nothing works.  Anyone know what I am doing wrong?


    well first it sounds to me like there is some confusion here on what you are doing.

    when we talk about the term "user control" means that it is some code and markup that run on the server and send html to the browser.

    if you have a dll that does server side stuff you can use a usercontrol on the server to attach it to a page.

    if you have code that runs on the client pc in the browser and it is in a dll then it needs to be an ActiveX dll.

    in general client side dll's should not be used. for example a client like an iPad or a windows 8 ie session from the "metro" UI will not run activex dll's

    do you have code that runs on the server or on the client ?