473,473 Members | 2,153 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

windows form controls in place of web controls in .net 2.0

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!
Nov 19 '05 #1
2 1277
I haven't seen the presentation you saw, but...
You can check the CLR version with this property:
Request.Browser.ClrVersion.Major

You can embed a windows forms control in an ASP.NET form with HTML like
this:
<OBJECT id="MyControl1" height="20" width="192"

classid="http:MyCustom.dll#MyNamespace.MyClassName ">

<PARAM NAME="Backcolor" VALUE="blue">

You have an unsupported browser.

</OBJECT>

Here's more info:

http://samples.gotdotnet.com/quickst...eSourcing.aspx
--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net


"Bryan ZM" <Br*****@discussions.microsoft.com> wrote in message
news:C7**********************************@microsof t.com...
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!

Nov 19 '05 #2
the simple method is to test the agent string (or browsercaps) for .net
support. then render the page different. i belive this will fail if the user
turns active/x support off on the browser. the safe method, is to write a
sniffer page that detects .net supported by creating a small control, and
returning the success to the server.

-- bruce (sqlwork.com)

"Bryan ZM" <Br*****@discussions.microsoft.com> wrote in message
news:C7**********************************@microsof t.com...
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!

Nov 19 '05 #3

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

Similar topics

3
by: Tzvika | last post by:
Hi, Is there a way to programmatically add/remove windows components in c# or in any other language What is the API fro that?
14
by: RL Stevenson | last post by:
What is a reasonable way to manage a complex form with 5 or so tabs with 100 or more controls bound to 5-10 tables in a database? Pasting all those controls, datasets, data adapters directly onto...
7
by: MounilK | last post by:
Hi all, I am not sure if this is the right NG to post this question. If that's the case please point me to the correct NG. I have a class library(myLib.dll) which has a class(myClass) which has...
6
by: | last post by:
Just a general question... When working with a form containing a treeview or similar control... if you need to show different form fields depending on what is selected in the treeview then what...
4
by: Rod Gill | last post by:
Hi, I have a form that when opened in the designer appears of the screen. The form selector can't be dragged (or resized) and if I scroll right and down to centralise it the form simply jumps...
1
by: Mian Mahboob | last post by:
Nicholas Paldino in my application a have an Windows form on that i place an Panel Control. in Form load event i ganerate an Form in Panel Control on Runtime then get an design time create...
1
by: Maya | last post by:
Hello everyone, I have a windows form that has 2 child usercontrols i created and added inside, control1 has a label that displays some text based on activities i do in control2, my question is...
15
by: =?Utf-8?B?TVNU?= | last post by:
To demonstrate my problem, I have a very simple VB Windows application. It has a text box that is used to display a counter, a button to reset the counter, and a timer that increments the counter...
6
by: John | last post by:
Hi If I have a choice of WPF or Windows Form versions of a control which one should I purchase? Thanks Regards
21
by: Dan Tallent | last post by:
In my application I have a form (Customer) that I want to be able to open multiple copies at once. Within this form I have other forms that can be opened. Example: ZipCode. When the user enters...
0
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,...
0
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...
0
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,...
1
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...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
1
muto222
php
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.