469,903 Members | 1,874 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,903 developers. It's quick & easy.

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

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

Nov 18 '05 #1
7 2601
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

"Tuckers" <Tu*****@discussions.microsoft.com> wrote in message
news:66**********************************@microsof t.com...
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

Nov 18 '05 #2
I think Kevin miss-understood the question.

This link tells you most of what you need:

http://samples.gotdotnet.com/quickst...eSourcing.aspx

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:eK**************@TK2MSFTNGP09.phx.gbl...
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

"Tuckers" <Tu*****@discussions.microsoft.com> wrote in message
news:66**********************************@microsof t.com...
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


Nov 18 '05 #3
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.


"AdrianJMartin" <Ad***********@newsgroups.nospam> wrote in message
news:ud**************@tk2msftngp13.phx.gbl...
I think Kevin miss-understood the question.

This link tells you most of what you need:

http://samples.gotdotnet.com/quickst...eSourcing.aspx

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:eK**************@TK2MSFTNGP09.phx.gbl...
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

"Tuckers" <Tu*****@discussions.microsoft.com> wrote in message
news:66**********************************@microsof t.com...
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



Nov 18 '05 #4
So does this mean a c# web control is by its nature server side based?

"Kevin Spencer" wrote:
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

"Tuckers" <Tu*****@discussions.microsoft.com> wrote in message
news:66**********************************@microsof t.com...
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


Nov 18 '05 #5
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

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Tuckers" wrote:
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

Nov 18 '05 #6
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

"Tuckers" <Tu*****@discussions.microsoft.com> wrote in message
news:8C**********************************@microsof t.com...
So does this mean a c# web control is by its nature server side based?

"Kevin Spencer" wrote:
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

"Tuckers" <Tu*****@discussions.microsoft.com> wrote in message
news:66**********************************@microsof t.com...
> 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
>


Nov 18 '05 #7
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

"Peter Bromberg [C# MVP]" wrote:
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

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Tuckers" wrote:
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

Mar 21 '06 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Sean | last post: by
5 posts views Thread by Andrew | last post: by
5 posts views Thread by Brad Baker | last post: by
1 post views Thread by tcc.se7en | last post: by
5 posts views Thread by =?Utf-8?B?bXBhaW5l?= | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.