Question .Net Chat Application

Shakthivel

New member
Joined
Feb 12, 2010
Messages
1
Programming Experience
1-3
hi techies,

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,

for clarity i have pasted my code please go through it and suggest your ideas


<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div id="ChatContent" runat="server" style="height: 250px; vertical-align: top; overflow:auto; text-align: left; margin-left: 10px; width: 97%;">
</div>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
</Triggers>
</asp:UpdatePanel>

The messages inside the div tag when exceeds the hieght of the div tag ie, my div tags hieght is 250px if the messages exceeds this height then if i scroll to see the messages in top i cant view it because always my scroll position is at bottom so once i move the scrollbar to top it immediately comes to the bottom, i have kept the scroll bar to be always at bottom, then only the user can instantly see his messages

how to view the topmost messages please suggest...

Thanks

Shakthi
 
Back
Top