Wrox Programmer Forums
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 12th, 2009, 08:40 PM
Authorized User
 
Join Date: Aug 2008
Posts: 38
Thanks: 1
Thanked 0 Times in 0 Posts
Default Winform to web form

I am creating an Instant Messenger web-based application. I managed to display the roster in a gridview.When i click on any name, i want to display a chat box so i can send and receive messages.To implement this, i think of 2 things
  1. create popup window using win.open()
  2. create and call a class using System.Windows.Forms and related objects.
I used the 2nd option . I customized it and it works.
Question 1. Does using and and calling winform in web app create problem in the future. (during deployment?) 2. What object can i used to replace it. I want the functionality of winform but have no idea bout possible limitations.. thanks
 
Old February 12th, 2009, 11:45 PM
jomet
Guest
 
Posts: n/a
Default

Do you tried calling this win app from another computer??
Is it worked??

My suggestion is,
Make a seperate win application.
and call it from web application( like doc file is opened using MS word when a doc file href is clicked). Similarly you can call the webapp with query string from win app.
 
Old February 12th, 2009, 11:53 PM
Authorized User
 
Join Date: Aug 2008
Posts: 38
Thanks: 1
Thanked 0 Times in 0 Posts
Default

I created a class (ChatForm.cs) using System.Windows.Form, then used other related controls..then when i click on any roster item the class is invoked..


ChatForm cf = new ChatForm();
Application.Run(cf);

The form i used is also located in the same web server location..
 
Old February 13th, 2009, 06:59 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
Question 1. Does using and and calling winform in web app create problem in the future. (during deployment?)
Yes, it will. Web is Web, and WinForms is WinForms. You cannot mix the two. Apart from the fact it's technically not feasible, what people who don't have .NET installed? They won't be able to use your application. It may work on your machine, but that's about it; it won't work for other users. A Web application needs to emit HTML, JavaScript, CSS and a bit more but cannot executed windows applications.

If you want to *start* (not run) an application from your web page, you can look into Click Once. With that, you can deploy an application over the web to a client (which needs the .NET framework) and run it there. However, this has of course severe limitations on your target audience and typically only works well in a controlled environment (think Intranet).

Quote:
2. What object can i used to replace it. I want the functionality of winform but have no idea bout possible limitations..
Web Forms and AJAX is what would work for a web based chat application. Take a look at the book ASP.NET 2.0 Instant Results; it has a whole chapter devoted to a web based chat box (not using ASP.NET AJAX though).

Hope this helps,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
maricar (February 15th, 2009)
 
Old February 15th, 2009, 08:21 PM
Authorized User
 
Join Date: Aug 2008
Posts: 38
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thank you so much..Now i understand..I will try to find other way to accomplish this..thanks and God bless
 
Old February 15th, 2009, 08:35 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Quote:
Take a look at the book ASP.NET 2.0 Instant Results; it has a whole chapter devoted to a web based chat box (not using ASP.NET AJAX though).
Dare I ask what it *DOES* use??? An <IFRAME> springs to my mind as perhaps the easiest choice. It's what I used with an old ASP-based system (that worked quite well for a reasonable number of chatters). Actually, I used a pair of <IFRAME>s. One completely hidden, just to receive new messages, and then one where the new messages were tacked onto the list as they were received (so that the server didn't need to send whole list each time).
 
Old February 15th, 2009, 08:53 PM
Authorized User
 
Join Date: Aug 2008
Posts: 38
Thanks: 1
Thanked 0 Times in 0 Posts
Default

I was thinking of something similar to a control/controls used in Microsoft forum when posting question(the one which slides half the web page)..also I forgot to include as info that the web app where i am gonna use this has limited space..it's from another application which i believe is a desktop that has a browser navigator..so i'm having problem how to display the chat box coz of that limited space that's why i thought i should display the chat box separately (on another window but i dont want to use web pop up)...
 
Old February 15th, 2009, 09:39 PM
Authorized User
 
Join Date: Aug 2008
Posts: 38
Thanks: 1
Thanked 0 Times in 0 Posts
Default

how about the control used here(in your forum) when posting question..is this an iframe...hope to get a some hints..
 
Old February 16th, 2009, 03:29 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
Dare I ask what it *DOES* use??? An <IFRAME> springs to my mind as perhaps the easiest choice.
I didn't write that chapter so I don't know the application very well. But, I did a quick search through the source and found an iframe, together with a bunch of ClientScript call back references....

@maricar: yes, I believe this editor is an iframe indeed, together with a standard <textarea> control and a lot of custom JaavScript.

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
While typing this post, I was listening to: Mysterons by Portishead (Track 1 from the album: Dummy) What's This?
 
Old February 16th, 2009, 08:06 PM
Authorized User
 
Join Date: Aug 2008
Posts: 38
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thanks a lot!..you made everything for me easy to understand...More power...





Similar Threads
Thread Thread Starter Forum Replies Last Post
WinForm Resizing instantiated form inside Tab Page maulik33 C# 4 June 13th, 2007 01:48 PM
set Focus to web control in Web form vivekshah C# 1 June 17th, 2006 03:25 AM
Access form to web form clott BOOK: Access 2003 VBA Programmer's Reference 0 February 13th, 2006 06:44 PM
WinForm and Sharepoint natarajan_ve .NET Web Services 0 July 28th, 2005 05:35 AM
Login WinForm in C# newkid82 BOOK: ASP.NET Website Programming Problem-Design-Solution 1 September 3rd, 2004 09:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.