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.    
LVL 1
HLRosenbergerAsked:
Who is Participating?
 
CodeCruiserConnect With a Mentor Commented:
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:
problem is I've never created a user control.  Also, wouldn't the control need a page to be placed into?  
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
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
 
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
 
HLRosenbergerAuthor Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.