Can a Web Forms Control be Used in a Desktop App?

Discussion in 'ASP .Net Building Controls' started by Greg, Feb 4, 2006.

  1. Greg

    Greg Guest

    Can a Web Forms Control be Used in a Desktop App?
    Can it even be used on a Windows Form?

    Are there any special needs on the desktop for running Web Forms e.g. is IIS
    needed, or as long as client system has .NET Framework a Web Forms app will
    run on it?

    --
    Greg McPherran
    www.McPherran.com
     
    Greg, Feb 4, 2006
    #1
    1. Advertising

  2. The short answer is No. A web forms control cannot be used directly in a
    desktop app.
    The long answer starts with "anything is possible given enough time and
    resources..." but I wouldn't consider it very feasible.
    Of course the web browser control can be used to embed web pages in a
    windows forms application, but I probably wouldn't try to use it for
    displaying a single control. In short, if you want to use web controls
    you're better off creating web applications.

    It's a little bit easier to do things the other way around and use a windows
    forms control within a web application, as demonstrated here:
    http://SteveOrr.net/articles/WinformControls.aspx

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://SteveOrr.net


    "Greg" <> wrote in message
    news:...
    > Can a Web Forms Control be Used in a Desktop App?
    > Can it even be used on a Windows Form?
    >
    > Are there any special needs on the desktop for running Web Forms e.g. is
    > IIS
    > needed, or as long as client system has .NET Framework a Web Forms app
    > will
    > run on it?
    >
    > --
    > Greg McPherran
    > www.McPherran.com
     
    Steve C. Orr [MVP, MCSD], Feb 9, 2006
    #2
    1. Advertising

  3. Sure. Host the browser in the ActiveX container that comes with Internet
    Explorer; interaction with your desktop app is cumbersome but can be done.
    i.e. you could pass data through a hidden frame/iframe, and have your app
    respond to 'change' events fired by the ActiveX control. Your app can then
    inpect the hidden data etc.

    "Greg" <> wrote in message
    news:...
    > Can a Web Forms Control be Used in a Desktop App?
    > Can it even be used on a Windows Form?
    >
    > Are there any special needs on the desktop for running Web Forms e.g. is
    > IIS
    > needed, or as long as client system has .NET Framework a Web Forms app
    > will
    > run on it?
    >
    > --
    > Greg McPherran
    > www.McPherran.com
     
    Richard Purchas, Feb 13, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TC
    Replies:
    4
    Views:
    669
    JohnnyAppleseed
    Feb 7, 2005
  2. RP
    Replies:
    2
    Views:
    532
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=
    Aug 19, 2007
  3. Alex Bryan

    Connecting a Desktop App to a Web App

    Alex Bryan, Jun 22, 2008, in forum: Python
    Replies:
    0
    Views:
    226
    Alex Bryan
    Jun 22, 2008
  4. Casey Hawthorne
    Replies:
    1
    Views:
    721
    Arne Vajhøj
    Mar 18, 2009
  5. iMath
    Replies:
    7
    Views:
    1,966
    iMath
    Nov 10, 2013
Loading...

Share This Page