Note that there are some explanatory texts on larger screens.

plurals
  1. PO.Net Chat Application
    primarykey
    data
    text
    <p>i am developing chat application using vb.net and asp.net where i am having a div tag inside which i am displaying the messages posted by the online users what my problem is when the messages are more and exceeds the height of the div tag then i am not comfortable to view the previous messages because i have set the scroll bar position to always to be pointed to bottom,</p> <p>for clarity i have pasted my code please go through it and suggest your ideas</p> <pre><code>&lt;asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"&gt; &lt;ContentTemplate&gt; &lt;div id="ChatContent" runat="server" style="height: 250px; vertical-align: top; overflow:auto; text-align: left; margin-left: 10px; width: 97%;"&gt; &lt;/div&gt; &lt;/ContentTemplate&gt; &lt;Triggers&gt; &lt;asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" /&gt; &lt;/Triggers&gt; &lt;/asp:UpdatePanel&gt; &lt;asp:UpdatePanel ID="UpdatePanel3" runat="server"UpdateMode="Conditional"&gt; &lt;ContentTemplate&gt; &lt;textarea id="UserInputTextBox" cols="72" rows="3" runat="server" onkeyup="if(event.keyCode == 13) Button2.click();" &gt; &lt;/textarea&gt; &lt;asp:Button ID="Button2" runat="server" CssClass="button" Text="Send" OnClick="Button2_Click" UseSubmitBehavior="False" /&gt; &lt;script type="text/javascript"&gt; Sys.Application.add_load(function() { var t = document.getElementById('ChatContent'); t.scrollTop = t.scrollHeight; }); &lt;/script&gt; &lt;/ContentTemplate&gt; &lt;/asp:UpdatePanel&gt; </code></pre> <p>Thanks </p> <p>Shakthi</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload