Using Windows.Forms namespace in a web form

  • Thread starter Thread starter Bryan G
  • Start date Start date
B

Bryan G

using System;

using System.Collections;

using System.ComponentModel;

namespace DashBoard

{

public class DashBoardForm : System.Web.UI.Page

{

}

How can I use a

Using System.Windows.Forms

in a .aspx C# web form.......................



Please help
 
Hi Bryan,

I don't think it is possible, but you can gain almost the same basic
features with a Page class as you have in your code.

Best Regards,

Robin Theilade
 
Bryan,

You can't. The classes in the System.Windows.Forms namespace are
intended for client side use only. When generating pages in ASP.NET, you
are producing markup that will be rendered on the client machine by a
browser. A "control" in the ASP.NET sense is just a collection of markup
and script (possibly).

Hope this helps.
 
Ok then how do I open a new window? Besides windows.open(.....)???



Nicholas Paldino said:
Bryan,

You can't. The classes in the System.Windows.Forms namespace are
intended for client side use only. When generating pages in ASP.NET, you
are producing markup that will be rendered on the client machine by a
browser. A "control" in the ASP.NET sense is just a collection of markup
and script (possibly).

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)


Bryan G said:
using System;

using System.Collections;

using System.ComponentModel;

namespace DashBoard

{

public class DashBoardForm : System.Web.UI.Page

{

}

How can I use a

Using System.Windows.Forms

in a .aspx C# web form.......................



Please help
 
<a href="theurlhtml" target="_blank">open window</a>

- Robin

Bryan G said:
Ok then how do I open a new window? Besides windows.open(.....)???



message news:[email protected]...
Bryan,

You can't. The classes in the System.Windows.Forms namespace are
intended for client side use only. When generating pages in ASP.NET, you
are producing markup that will be rendered on the client machine by a
browser. A "control" in the ASP.NET sense is just a collection of markup
and script (possibly).

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)


Bryan G said:
using System;

using System.Collections;

using System.ComponentModel;

namespace DashBoard

{

public class DashBoardForm : System.Web.UI.Page

{

}

How can I use a

Using System.Windows.Forms

in a .aspx C# web form.......................



Please help
 
ok but where in my code do i put this href code???

Robin Theilade said:
<a href="theurlhtml" target="_blank">open window</a>

- Robin

Bryan G said:
Ok then how do I open a new window? Besides windows.open(.....)???



message news:[email protected]...
Bryan,

You can't. The classes in the System.Windows.Forms namespace are
intended for client side use only. When generating pages in ASP.NET, you
are producing markup that will be rendered on the client machine by a
browser. A "control" in the ASP.NET sense is just a collection of markup
and script (possibly).

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)


using System;

using System.Collections;

using System.ComponentModel;

namespace DashBoard

{

public class DashBoardForm : System.Web.UI.Page

{

}

How can I use a

Using System.Windows.Forms

in a .aspx C# web form.......................



Please help
 
Somewhere, where you would like to send it to the user's client with the use
of the Response.Write() method.

Note: the code is still on the client side like the javascript window.open()

- Robin

Bryan G said:
ok but where in my code do i put this href code???

Robin Theilade said:
<a href="theurlhtml" target="_blank">open window</a>

- Robin

Bryan G said:
Ok then how do I open a new window? Besides windows.open(.....)???



"Nicholas Paldino [.NET/C# MVP]" <[email protected]>
wrote
in
message Bryan,

You can't. The classes in the System.Windows.Forms namespace are
intended for client side use only. When generating pages in
ASP.NET,
you
are producing markup that will be rendered on the client machine by a
browser. A "control" in the ASP.NET sense is just a collection of markup
and script (possibly).

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)


using System;

using System.Collections;

using System.ComponentModel;

namespace DashBoard

{

public class DashBoardForm : System.Web.UI.Page

{

}

How can I use a

Using System.Windows.Forms

in a .aspx C# web form.......................



Please help
 
Back
Top