[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 452
  • Last Modified:

class library - Add a WEB form

is there a way to add a WEB form to a class library?  if not, is there a way to have a visual component in a class library?  I want to prompt the user, using Javsacript showModalDialog, for parms.    
0
HLRosenberger
Asked:
HLRosenberger
  • 5
  • 4
1 Solution
 
HLRosenbergerAuthor Commented:
problem is I've never created a user control.  Also, wouldn't the control need a page to be placed into?  
0
 
HLRosenbergerAuthor Commented:
Another question.  What if I add a Windows form or dialog to me DLL class library, and then the DLL is used by a WEB app?  Is that  no-no?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
CodeCruiserCommented:
>What if I add a Windows form or dialog to me DLL class library, and then the DLL is used by a WEB app? Is that  no-no?

Correct.


> Also, wouldn't the control need a page to be placed into?

You can use the control on a webpage as shown in the example in link.
0
 
HLRosenbergerAuthor Commented:
But I dont have a WEB page, that's the point.   There is no WEB page in a DLL.

I just added a Windows Form to my DLL.  That is allowed.  The DLL is being used by a WEB app of mine.  I ran it and I get the  Windows Form displayed.   Where/why/when would this not work?
0
 
CodeCruiserCommented:
>There is no WEB page in a DLL.

The DLL wont work by itself. It would need to be called by some client.

> Where/why/when would this not work?
It would show the form on the webserver not the client.
0
 
HLRosenbergerAuthor Commented:
"It would show the form on the webserver not the client.'

Ah, got it!


I understand that a DLL needs to be called by a client.  That is what I am doing - it is being called by a WEB app client.   I could add a WEB form into the APP so I can prompt the user, but I was trying to avoid that.   A Class library will not allow you to add a WEB form, so how can add a user control?  I'm missing something.    
0
 
CodeCruiserCommented:
I provided two links which show how to precompile a user control into a DLL. You will have to start with a web project but when you precompile this website, your user control will be precompiled into a DLL.
0
 
HLRosenbergerAuthor Commented:
thanks
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now