Click here to Skip to main content
15,892,298 members
Articles / Web Development / ASP.NET

A simple ASP.NET chat

Rate me:
Please Sign up or sign in to vote.
3.90/5 (21 votes)
18 Feb 2007CPOL2 min read 453.8K   5K   27  
A simple chat application using ASP.NET.
Public Class _private
    Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

    End Sub

    'NOTE: The following placeholder declaration is required by the Web Form Designer.
    'Do not delete or move it.
    Private designerPlaceholderDeclaration As System.Object

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        'CODEGEN: This method call is required by the Web Form Designer
        'Do not modify it using the code editor.
        InitializeComponent()
    End Sub

#End Region
    Dim message, chatname, temp(), client As String
    Dim j
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        chatname = Request.QueryString("client")
        temp = Split(chatname, "-")
        Response.Write("<frameset rows='60%,*' framespacing='0' border='0' frameborder='no' bordercolor='#ffffff'>")
        Response.Write("<frame name='display' src='disp.aspx?client='" & chatname & "  noresize frameborder='no'>")
        Response.Write("<frame name='message' src='message.aspx?client='" & chatname & "  frameborder='no'>")
        Response.Write("</frameset>")


        'send request to user
        Application.Lock()
        j = Application.Contents.Count
        'adding new data
        Application("txt" & j + 1) = "/private " & temp(0) & " " & chatname
        Application.UnLock()
    End Sub

End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Technical Lead
India India
have been working in web technologies for the last 8 years.

Comments and Discussions