How to insert a c# web control into a web page (if I don't have II

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am exploring c#. I want to reference a c# web control in a web page much
like you can with an activeX control. The syntax for doing this in ActiveX is
something like
<OBJECT ID="WKMapControl"
CLASSID="CLSID:9EA6DD6C-5858-4EC3-93D5-79B2863DF2CF"></OBJECT>

I can view this page and see the ActivX control even without a web server.

As I have not got IIS installed I cannot create an ASP project and drag and
drop the component on a web page. Can I do the same thing as above and if I
can what are the parameters for the object?

cheers

Tuckers
 
ActiveX Controls are client-side. Server Controls are server-side. ActiveX
Controls in web pages are generally some kind of exectuable application on
the client that presents a Windows Forms interface to the user, while being
hosted in the browser user interface. Server Controls insert HTML into an
HTML document that is returned to a client by a web server. Therefore, there
is no connection between them. They have no relationship whatsoever, unless
you consider the word "Control" as part of the moniker to be a connection of
some sort.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
If you push something hard enough,
it will fall over.
- Fudd's First Law of Opposition
 
ooops I mid read the question!(sorry Kevin) But in my defense I think the
asker asked the wrong question! ( to which i provided an answer!) %-)

But still check out the link it may be what you were after.
 
It sounds like what you want is a UserControl, which is a WinForms - based UI
control that is compiled as a dll. This is then hosted in the page also using
an OBJECT tag pointing to the dll.

I'd really discourage this however as handling the various security issues
with trust can be onerous. And of course, the .NET Framework must be
installed on the client machine.
Peter
 
Yes. It only really exists on the server. It renders HTML to the client. The
user interacts with the HTML, which then posts back information to the
server, where the classes are re-built, handle client-side events, perform
whatever is necessary, and then render HTML back to the client.

That is what ASP.Net is all about.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
If you push something hard enough,
it will fall over.
- Fudd's First Law of Opposition
 
Hi Peter,
I have used this technique to embed a control. However, the control attempts
drag and drop functionality. event occurs but the data disapears. I'm
assuming that this is probably a security issue. Do you have any ideas how to
resolve this or could you point me in the direction of good reference
material?

Thanks,
Dan
 

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

Back
Top