473,666 Members | 2,225 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can I place a User Control (not Web Control) in IE


I have created a User Control (a Pareto Chart) using C#. It works great in .Net Windows Apps, but I also need to use it in a Web Application (to view in IE). Everything I read on this seems to be talking about Web Controls (although the terms "Web Control" and "User Control" seem to be used interchangeably ). Can I use this Control in IE even though its not a Web Control? Whats the alternative? The Control project is fairly extensive, using several windows forms, datagrids, and GDI+ for drawing the chart onto the User Control. thanks.

---
Posted using Wimdows.net NntpNews Component -

Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.
Nov 18 '05 #1
4 1406
You can use a WebUserControl in any WebForm. Your WebApplication can use any
controls from System.Web not from System.Forms these controls are used for
different targets one is windows the other is web.

Enrique

"DotNetJunk ies User" <User@-NOSPAM-DotNetJunkies.c om> wrote in message
news:e9******** ********@tk2msf tngp13.phx.gbl. ..

I have created a User Control (a Pareto Chart) using C#. It works great
in .Net Windows Apps, but I also need to use it in a Web Application (to
view in IE). Everything I read on this seems to be talking about Web
Controls (although the terms "Web Control" and "User Control" seem to be
used interchangeably ). Can I use this Control in IE even though its not a
Web Control? Whats the alternative? The Control project is fairly
extensive, using several windows forms, datagrids, and GDI+ for drawing
the chart onto the User Control. thanks.

---
Posted using Wimdows.net NntpNews Component -

Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup
engine supports Post Alerts, Ratings, and Searching.

Nov 18 '05 #2
You seems a little confused with the term Web Controls. Let me clear things
for you
Controls are of following types

1. Windows Controls
1.a Windows Controls (e.g. TextBox, Button etc.)
1.b Win User Controls (the one u made)
2. Web Controls
2.a ASP.NET Server Controls (e.g. TextBox , Button etc. the ones used in
web forms)
2.b Web User Controls (the one u need to make)

All the control types that are listed on the top are not interchangeable , so
if you made a superb Win User Control and u want to use it on your web
applications, you cant do so. You'll need to make a similar Web User
Control.

I hope this helps
"DotNetJunk ies User" <User@-NOSPAM-DotNetJunkies.c om> wrote in message
news:e9******** ******@tk2msftn gp13.phx.gbl...

I have created a User Control (a Pareto Chart) using C#. It works great in .Net Windows Apps, but I also need to use it in a Web Application (to
view in IE). Everything I read on this seems to be talking about Web
Controls (although the terms "Web Control" and "User Control" seem to be
used interchangeably ). Can I use this Control in IE even though its not a
Web Control? Whats the alternative? The Control project is fairly
extensive, using several windows forms, datagrids, and GDI+ for drawing the
chart onto the User Control. thanks.
---
Posted using Wimdows.net NntpNews Component -

Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup

engine supports Post Alerts, Ratings, and Searching.
Nov 18 '05 #3
I can understand your confusion, especially since it seems that web
application development must be new to you. The term "User Control" is used
to mean different things in different contexts. Basically, the generic idea
of "User Control" is a Control that is defined by the developer, rather than
part of the pre-existing platform Controls. Some of the confusion arises due
to Microsoft's naming of a specific type of System.Web.UI.C ontrol as a
"UserContro l." This refers specifically to a templated control which, like
System.Web.UI.P age, has 2 components: A Template file and a CodeBehind
class. However, in ASP.Net, there are 3 other distinctions of Controls.
First, there is the base class, System.Web.UI.C ontrol. From this, 2 other
namespaces of classes of Controls are derived: HtmlControls and WebControls.

Note, however, the parent NameSpace: System.Web.UI. A Windows Form Control
is in the NameSpace of System.Windows. Forms.Control. As you can see, these
are completely un-related in terms of NameSpace and functionality. A Windows
executable is an application that operates in the local machine environment.
An ASP.Net application is an application that operates in the context of a
web server. And never the twain shall meet. The similarities are due to the
fact that both types of Controls are defined as Controls because they are UI
components, but beyond that they share nothing in common. A Windows Form
Control renders by drawing to a graphic device. A Web Control renders by
emitting HTML to a stream.

So, bottom line: You can't use your Windows Form Control in an ASP.Net
application. The alternative is to create a System.Web.UI.C ontrol which
renders itself to an HTML document by emitting HTML.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"DotNetJunk ies User" <User@-NOSPAM-DotNetJunkies.c om> wrote in message
news:e9******** ******@tk2msftn gp13.phx.gbl...

I have created a User Control (a Pareto Chart) using C#. It works great in .Net Windows Apps, but I also need to use it in a Web Application (to
view in IE). Everything I read on this seems to be talking about Web
Controls (although the terms "Web Control" and "User Control" seem to be
used interchangeably ). Can I use this Control in IE even though its not a
Web Control? Whats the alternative? The Control project is fairly
extensive, using several windows forms, datagrids, and GDI+ for drawing the
chart onto the User Control. thanks.
---
Posted using Wimdows.net NntpNews Component -

Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup

engine supports Post Alerts, Ratings, and Searching.
Nov 18 '05 #4
Just want to make a small correction. In my original post (quoted below) I
said "From this, 2 other namespaces of classes of Controls are derived:
HtmlControls and WebControls." While this is certainly true, some might
point out that there are other NameSpaces under System.Web.UI.C ontrol. I
simply omitted them, as I thought they were irrelevant to the discussion.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Kevin Spencer" <ks******@takem pis.com> wrote in message
news:e0******** ******@TK2MSFTN GP15.phx.gbl...
I can understand your confusion, especially since it seems that web
application development must be new to you. The term "User Control" is used to mean different things in different contexts. Basically, the generic idea of "User Control" is a Control that is defined by the developer, rather than part of the pre-existing platform Controls. Some of the confusion arises due to Microsoft's naming of a specific type of System.Web.UI.C ontrol as a
"UserContro l." This refers specifically to a templated control which, like
System.Web.UI.P age, has 2 components: A Template file and a CodeBehind
class. However, in ASP.Net, there are 3 other distinctions of Controls.
First, there is the base class, System.Web.UI.C ontrol. From this, 2 other
namespaces of classes of Controls are derived: HtmlControls and WebControls.
Note, however, the parent NameSpace: System.Web.UI. A Windows Form Control
is in the NameSpace of System.Windows. Forms.Control. As you can see, these
are completely un-related in terms of NameSpace and functionality. A Windows executable is an application that operates in the local machine environment. An ASP.Net application is an application that operates in the context of a
web server. And never the twain shall meet. The similarities are due to the fact that both types of Controls are defined as Controls because they are UI components, but beyond that they share nothing in common. A Windows Form
Control renders by drawing to a graphic device. A Web Control renders by
emitting HTML to a stream.

So, bottom line: You can't use your Windows Form Control in an ASP.Net
application. The alternative is to create a System.Web.UI.C ontrol which
renders itself to an HTML document by emitting HTML.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"DotNetJunk ies User" <User@-NOSPAM-DotNetJunkies.c om> wrote in message
news:e9******** ******@tk2msftn gp13.phx.gbl...

I have created a User Control (a Pareto Chart) using C#. It works
great in .Net Windows Apps, but I also need to use it in a Web Application (to
view in IE). Everything I read on this seems to be talking about Web
Controls (although the terms "Web Control" and "User Control" seem to be
used interchangeably ). Can I use this Control in IE even though its not a
Web Control? Whats the alternative? The Control project is fairly
extensive, using several windows forms, datagrids, and GDI+ for drawing the chart onto the User Control. thanks.

---
Posted using Wimdows.net NntpNews Component -

Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup

engine supports Post Alerts, Ratings, and Searching.

Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1764
by: .Net Newbie | last post by:
I am relatively new to .Net and have been coding an intranet site for my employer for a couple of months. I am currently stuck coding in a text-editor called EditPlus without access to the VS.Net IDE, and coding pages with the script directly in each page (not using the codebehind method) as most of my learning material has demonstrated. I started with the IBuySpy Portal (SDK version not VS Version) as my base portal and have coded...
3
1189
by: Joe Au | last post by:
How to place the web user controls on the web form freely the location I want? Especially, if I get more than one web user controls. Thanks. Joe.
4
2387
by: pei_world | last post by:
in asp or php, we can use inner output command to print out text or other thing inside out web page. I want to know how to do this in asp.net. I know user control with placesholder can do, but if I want to generate a image and output to client directly, then I cann't set the imageurl. I want to know if there is anyway that I can display this image to user in some place of my web page. thanks
2
1967
by: ALI-R | last post by:
Hi I've created a bunch user comtrols for the footer,header,navigation bar of a webpage ,I have two problems: 1) All the controls are in the folder "Control" of the root and all the images are in the folder "Images" of the root ,all the hosting pages for my user controls are also in the root,what kind of path should I use for images in my user control? absolute,relative,..?
2
1287
by: Bryan ZM | last post by:
I saw a sample app at the VS live conference in San Francisco this year, they had a gridview control on a web form, but when .net 2.0 was detected on the PC it actually rendered a .net form control in place of the web control. I am playing around with beta 2 and trying to replicate that behavior. Does anyone know how to do this???? Any help would be appreciated!!! Thanks!
2
1132
by: Andrew | last post by:
Hello, friends, I have a couple of web user controls, and I put it in my .net web page. But, they alway went to the top of the design window, no matter how I dragged-dropped them. (looks silly, right?) Any ways to make them in the place I want? Thanks a lot.
1
1794
by: Andrew | last post by:
Hi, friends, This drove me nuts: I had two web user controls: header.ascx and copyright.ascx. I planed to put them on each .aspx pages: Header on the top, and Copyright at the bottom. However, I could NOT place them in the correct positions of the .aspx pages. The header.ascx, copyright.ascx, and contents of .aspx kept OVERLAP each other. For example, in the following .aspx, the two web user controls
3
3443
by: JimCinLA | last post by:
I use a place holder to load different user controls on an .aspx page. Let's call this default.aspx. Each user controls contains about a dozen different ASP.Net controls. My question is, how can I retrieve the list of controls from default.aspx?
3
1304
by: RvGrah | last post by:
I have a user control with eight text boxes, if I start typing in the first text box in the tab order all is well, but if I mouse click into another box and start typing the text goes into the frst box rather than the one I put the focus in. The caret is in the right box, though no in the right place, but the text appears in the wrong box. Using VS Pro 2005 in Windows Vista, with sp1 and sp1 vista refresh beta. Bob Graham
0
8356
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
8781
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
8550
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
8639
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...
0
7385
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5663
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2769
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
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.