473,811 Members | 2,380 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="WKMapContro l"
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 2712
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*****@discus sions.microsoft .com> wrote in message
news:66******** *************** ***********@mic rosoft.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="WKMapContro l"
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***@DIESPAMM ERSDIEtakempis. com> wrote in message
news:eK******** ******@TK2MSFTN GP09.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*****@discus sions.microsoft .com> wrote in message
news:66******** *************** ***********@mic rosoft.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="WKMapContro l"
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.


"AdrianJMar tin" <Ad***********@ newsgroups.nosp am> wrote in message
news:ud******** ******@tk2msftn gp13.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***@DIESPAMM ERSDIEtakempis. com> wrote in message
news:eK******** ******@TK2MSFTN GP09.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*****@discus sions.microsoft .com> wrote in message
news:66******** *************** ***********@mic rosoft.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="WKMapContro l"
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*****@discus sions.microsoft .com> wrote in message
news:66******** *************** ***********@mic rosoft.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="WKMapContro l"
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="WKMapContro l"
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*****@discus sions.microsoft .com> wrote in message
news:8C******** *************** ***********@mic rosoft.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*****@discus sions.microsoft .com> wrote in message
news:66******** *************** ***********@mic rosoft.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="WKMapContro l"
> 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="WKMapContro l"
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
13227
by: jason | last post by:
How does one loop through the contents of a form complicated by dynamic construction of checkboxes which are assigned a 'model' and 'listingID' to the NAME field on the fly in this syntax: Hunter_69. Here is what the form looks like. I have the difficulty of inserting the multiple items selected by the user the first time he visits and uses the screen and then using an UPDATE when he visits later. Model | Original Price | Reduced Price...
6
3192
by: Sean | last post by:
HI There, I am making the transition from asp to asp .net, I am currenty writing an application that requires a bulk insert from a webform into SQL server, normally I would just create rows of html textboxes and then use the Request.Form.Count property to collect each field. What I would like to know is what is a good way of doing this in asp.net? Do I need to create an array of textboxes or can I do this fro a datagrid?
20
5667
by: Guadala Harry | last post by:
In an ASCX, I have a Literal control into which I inject a at runtime. litInjectedContent.Text = dataClass.GetHTMLSnippetFromDB(someID); This works great as long as the contains just client-side HTML, CSS, etc. What I want to do is somehow insert a *server control* into the , then set the server control's properties at runtime.
5
4085
by: Andrew | last post by:
Hi, friends, In ASP, we use obj = CreateObject("com.dll") obj.GetHTMLText(inVal, outHTMLTxt1, outHTMLTxt2) to get different HTML strings based on input values. Then, we insert them into proper location of HTML something like the following: <table>
7
4358
by: Lorenzino | last post by:
Hi, I have a problem with bindings in a formview. I have a formview; in the insert template i've created a wizard control and inside it i have an HTML table with some textboxes bound to the sqldatasource of the formview. If i put this textboxes outside the table everything works well, but as soon as i put them inside the table (in order to organize the layout in the right way) they doesn't work. They works only as eval() and not bind()...
5
2619
by: Brad Baker | last post by:
I'm trying to write a simple asp.net page which updates some data in a SQL database. At the top of the page I have the following code: <%@ Page Language="C#" Debug="true" %> <%@ import namespace="System.Data" %> <%@ import namespace="System.Data.SqlClient" %> <script language="c#" runat="server"> public void Page_Load(object sender, EventArgs e) {
1
3272
by: tcc.se7en | last post by:
Hi -- I have an ASP.NET web app that I just converted to use a Master Page for common content (banner and nav). I also just updated my version of the MS Ajax framework to the latest one (and had to rename my controls to <asp:...instead of <atlas:...etc..) I have a DetailsView on the page, with Edit and Insert capability. When I insert a record, I get an exception as follows, but it's after
5
3471
by: =?Utf-8?B?bXBhaW5l?= | last post by:
Hello, I am completely lost as to why I can't update a DropDownList inside a DetailsView after I perform an insert into an object datasource. I tried to simply it down to the core demostration: default.aspx:
3
2083
by: deneushasler | last post by:
Hello my name is Juan Jose. My problem is as follows. When I try to insert a record into a table (access) to control DetailsView Visual Web Developer 2005, when I run the page and insert a record pulse, whenever I get the following error: How could fix it?
0
9734
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9607
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10395
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10408
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10137
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7673
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4346
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3874
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3026
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.