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

ASP.NET Chatting using WCF Services and JSon

Rate me:
Please Sign up or sign in to vote.
4.75/5 (30 votes)
1 Dec 2011CPOL5 min read 161K   17.4K   110  
ASP.NET chatting using WCF Services and JSon
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Chat.aspx.cs" Inherits="Chat" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
    <title></title>
    <style type="text/css">
        .style1
        {
            height: 82px;
        }
        .style2
        {
            height: 12px;
        }
    </style>
    <script language=javascript src="Scripts/ChatWindow.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
                    </asp:ScriptManager>
    <div>
    
        <table style="width: 100%;">
            <tr>
                <td>
                    &nbsp;
                    
                </td>
            </tr>
            <tr>
                <td class="style2" height="8px" style="background-color:orange"></td>
            </tr>
            <tr>
                <td class="style1">
                    &nbsp;
                    
                            <asp:Panel ID="msgPanel" Font-Names="verdana" Font-Size="8pt" runat="server" Height="359px" BorderStyle="Solid" BorderWidth="1pt">
                            </asp:Panel>
                            <asp:Panel ID="lblUrl" runat="server"></asp:Panel>
                        
                </td>
            </tr>
            <tr>
                <td class="style2" height="8px" style="background-color:orange"></td>
            </tr>
            <tr>
                <td>
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                        <table border=0><tr><td><asp:TextBox ID="txtMsg" runat="server" Height="72px" Width="338px" 
                        Font-Names="Verdana" Font-Size="8pt" MaxLength="1000" TextMode="MultiLine"></asp:TextBox></td>
                        <td valign=bottom><asp:Button ID="btnSend" runat="server" Text="Send" Width="74px" 
                                onclick="btnSend_Click" /></td></tr></table>
                    </ContentTemplate>
       </asp:UpdatePanel>
                </td>
            </tr>
        </table>
        
    </div>
    <input type="hidden" id="hidChatId" runat="server" />
    </form>
</body>
</html>

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
Hi, I am Narsimlu Keshagouni working as Technical Lead in Hyderabad, India.

Comments and Discussions