473,320 Members | 2,112 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

UserControl looks different

Hello,

I have created a UserControl in c#, and put it inside a web page. The
control contains a listbox and a button. For some reason the control
looks different when I use it on a "normal" form (windows application)
than it looks when used within a webpage. For example the button loses
its 3D look.

Can anyone explain this behavior? (I'm using IE 6 the ASP page is using
..net 2.0).

Thanks.

Jan 1 '07 #1
6 1075
They are not supposed to look the same. A windows form is rendered by
Windows. A web form is rendered by a browser. Two different worlds.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"eransha" <er************@gmail.comwrote in message
news:11**********************@s34g2000cwa.googlegr oups.com...
Hello,

I have created a UserControl in c#, and put it inside a web page. The
control contains a listbox and a button. For some reason the control
looks different when I use it on a "normal" form (windows application)
than it looks when used within a webpage. For example the button loses
its 3D look.

Can anyone explain this behavior? (I'm using IE 6 the ASP page is using
.net 2.0).

Thanks.

Jan 1 '07 #2
Eliyahu,

Thanks for the response. But both window form and browser "see" the
same graphic dlls when it comes to .net GUI, otherwise what's the point
in desiging the GUI of a user control if it ends up totaly different?

Eliyahu Goldin wrote:
They are not supposed to look the same. A windows form is rendered by
Windows. A web form is rendered by a browser. Two different worlds.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"eransha" <er************@gmail.comwrote in message
news:11**********************@s34g2000cwa.googlegr oups.com...
Hello,

I have created a UserControl in c#, and put it inside a web page. The
control contains a listbox and a button. For some reason the control
looks different when I use it on a "normal" form (windows application)
than it looks when used within a webpage. For example the button loses
its 3D look.

Can anyone explain this behavior? (I'm using IE 6 the ASP page is using
.net 2.0).

Thanks.
Jan 1 '07 #3
"eransha" <er************@gmail.comwrote in message
news:11**********************@a3g2000cwd.googlegro ups.com...
But both window form and browser "see" the same graphic dlls
when it comes to .net GUI,
???
Jan 1 '07 #4
Hi,

eransha wrote:
Eliyahu,

Thanks for the response. But both window form and browser "see" the
same graphic dlls when it comes to .net GUI, otherwise what's the point
in desiging the GUI of a user control if it ends up totaly different?
I think you are confused about ASP.NET. In WinForms applications, the
rendering engine is .NET on Windows. The controls look accordingly. On
ASP.NET, however, the rendering engine is the web browser's HTML engine.
It's a totally different environment, not even mentioning a different
application model. The fact that it's a User control doesn't change it.

That said, there is a possibility to expose WinForms user controls on IE
only, and on Windows only, as an ActiveX control. The .NET framework
must be installed on the client. Is that what you want?

http://www.codeproject.com/cs/miscct...wincontrol.asp

I wouldn't recommend it, though.

HTH,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Jan 1 '07 #5
Laurent,

This is exactly what I did. I compiled a UserForm into a dll and loaded
it in two ways:
once in a normal windows forms application, and once as a part of the
web page. The control looks different on each.
Laurent Bugnion [ASP.NET MVP] wrote:
Hi,

eransha wrote:
Eliyahu,

Thanks for the response. But both window form and browser "see" the
same graphic dlls when it comes to .net GUI, otherwise what's the point
in desiging the GUI of a user control if it ends up totaly different?

I think you are confused about ASP.NET. In WinForms applications, the
rendering engine is .NET on Windows. The controls look accordingly. On
ASP.NET, however, the rendering engine is the web browser's HTML engine.
It's a totally different environment, not even mentioning a different
application model. The fact that it's a User control doesn't change it.

That said, there is a possibility to expose WinForms user controls on IE
only, and on Windows only, as an ActiveX control. The .NET framework
must be installed on the client. Is that what you want?

http://www.codeproject.com/cs/miscct...wincontrol.asp

I wouldn't recommend it, though.

HTH,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Jan 2 '07 #6
Hi,

eransha wrote:
Laurent,

This is exactly what I did. I compiled a UserForm into a dll and loaded
it in two ways:
once in a normal windows forms application, and once as a part of the
web page. The control looks different on each.
I see. Unfortunately, I don't have experience with this.

Sorry,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Jan 2 '07 #7

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

Similar topics

2
by: bill yeager | last post by:
When trying to run my web project, I get the following error: Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the...
4
by: Harry | last post by:
Hello, I have a page with a RadioButtonList and a PlaceHolder control. The RadioButtonList's AutoPostBack attribute is set to TRUE and its SelectedIndexChanged event loads one of three...
2
by: Sascha | last post by:
Hi there, I searched carefully through the web before finally deciding to post this message, because I could not find a solution for my problem. Hopefully someone will have a hint or explanation...
41
by: JohnR | last post by:
In it's simplest form, assume that I have created a usercontrol, WSToolBarButton that contains a button. I would like to eventually create copies of WSToolBarButton dynamically at run time based...
1
by: Giovanni | last post by:
Dear Friends/Gurus, I have exhausted myself and have yet no solution to the following: I have an ASP.NET 2.0 Survey type application. On a page, I have placed a GridView which is bound to an...
9
by: Jacek Jurkowski | last post by:
.... make COM exposed object to have both constructors COM visible not only the first one?
2
by: Steve | last post by:
This is a weird one. I have a series of "SmartParts" which are CAB (Composite Application Block) Views which are finally just UserControls (99% of the time) Anyway, I layout my UserControl in...
2
by: Rene Sørensen | last post by:
In VS 2005 I'm trying to create a usercontrol, but I have some problems with it right now I can't figure out how to fix. The size of my usercontrol is "Size 574; 619" I have anchored all controls...
6
by: MeowCow | last post by:
I have created a UserControl that encapsulates a third party data grid. My goal was to create my own DataSource and DataMember properties that forward the binding to the third party grid, then use...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.