<div id="scrollChat" style="overflow: auto; width: 80%; height: 250px; margin-left: auto; margin-right: auto;"> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:Timer ID="timer" runat="server" OnTick="timer_Tick" Interval="2000"> </asp:Timer> <asp:UpdatePanel ID="upChat" runat="server" UpdateMode="Conditional"> <Triggers> <asp:AsyncPostBackTrigger ControlID="timer" EventName="Tick" /> </Triggers> <ContentTemplate> <asp:GridView ID="gvChat" runat="server" Style="width: 100%;" Font-Names="Verdana" AutoGenerateColumns="True" ShowHeader="False" GridLines="None"> <RowStyle Height="25" /> </asp:GridView> </ContentTemplate> </asp:UpdatePanel> <div id="chat" style="height: 1px;"> </div> </div> <div style="width: 100%; height: 100px; text-align: center; margin-removed 30px;"> <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:TextBox ID="tbMsg" Rows="3" Height="60px" Width="80%" TextMode="multiline" runat="server" Style="margin-bottom: 15px;" Font-Names="Verdana" placeholder="Type your message here..."></asp:TextBox> <br /> <asp:Button ID="btnSend" class="btn btn-primary btn-lg" runat="server" Text="Send" OnClick="btnSend_Click" Width="200px" Font-Bold="true" Font-Names="Verdana" OnClientClick="btnSend_Click" /> </ContentTemplate> </asp:UpdatePanel> </div> <br /> <br /> <script type="text/javascript"> Sys.Application.add_load(function () { var t = document.getElementById('scrollChat'); t.scrollTop = t.scrollHeight; }); </script>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)