connect client to server aspx page with 2 listviews

Vereato 20 Reputation points
2026-11-15T03:43:25.42+00:00

Hi there any one can help me with this i am trying to create a client connect to connect to server using

client connect - http://chat.room1:6060/chat1aspx

server - chat1.aspx / has 2 controls / Chat = richtextbox / users listview

i want to use forms running and connect to the chat1.aspx to show on the form richtext and listview users

its possible to do this using client connection to use this chat

chat1.aspx will be running MySQL database to load data from database

how i can do this for each this is for work on a chat room using multi chat rooms

chat1.aspx

chat2.aspx

chat3.aspx

any help or better idea thanks

Developer technologies | ASP.NET Core | Other
0 comments No comments

2 answers

Sort by: Oldest
  1. Nguyen Dam (WICLOUD CORPORATION) 1,580 Reputation points Microsoft External Staff Moderator
    2026-11-16T03:27:41.93+00:00

    Hello @Vereato and thank you for reaching out. 

    If I understand correctly, you want your Windows Forms client to connect to each chat room (chat1.aspx, chat2.aspx, chat3.aspx) the same way, loading that room's messages and users from the server. 

    For example:   

    1. On the server, have each room's page (or a generic handler .ashx) query MySQL for that room's messages and users, and return them as JSON or plain text instead of rendering HTML.  
    2. In the Windows Forms app, store the URL for each room, for example http://chat.room1:6060/chat1.aspx, http://chat.room1:6060/chat2.aspx, and so on. If you use an .ashx handler, use its URL instead. 
    3. When the user selects a room, send a request to that room's URL using HttpClient.  
    4. Parse the response, then put the messages in the RichTextBox and the users in the ListView.  

    To keep the chat updated, repeat the request at an interval, for example with a Timer.  

    If you plan to add more rooms later, you can also use a single endpoint that takes the room as a parameter (for example, chat.ashx?room=1), so you don't need to create a new page for each room.

    You can find examples of sending requests and reading responses in the Make HTTP requests with the HttpClient guide.  

    If this isn't what you're trying to do, please clarify what you'd like the client to do when it connects to a chat room. 

    If you found my response helpful or informative, I would greatly appreciate it if you could follow this guide for your confirmation. Thank you. 

    Was this answer helpful?

    0 comments No comments

  2. Bruce (SqlWork.com) 85,421 Reputation points
    2026-11-16T16:46:52.26+00:00

    the best solution would be for the chat website to implement a webapi callable from your application.

    if you can not modify the website, then you will need to use screen scraping technology to call the website. you should do some reverse engineering of the website to see if there is an underlying api that javascript calls (pretty common for chat).

    if the website uses web socket for chat (also common), you may need to use a headless browser to scrape.

    another option is to host a web view in your application.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.