Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6946181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:31:54+00:00 2026-05-27T13:31:54+00:00

I am trying to create a basic video and text chat web site.In the

  • 0

I am trying to create a basic video and text chat web site.In the room page I have the video as flash and a textbox(multiline) which shows all the messages sent to the room and one textbox for users to type and send by clicking the button beside it

<tr>
    <td>
         <asp:UpdatePanel ID="UpdtPnlMesajlar" runat="server" EnableViewState="true">
               <ContentTemplate>
                      <table>
                             <tr>
                                 <td>
                                     <asp:TextBox ID="TxtBxOdaMesajlari" 
                                      runat="server" ReadOnly="true"
                                      TextMode="MultiLine"
                                      Width="475" Height="100"  >
                                     </asp:TextBox>
                                 </td>
                             </tr>
                             <tr>
                                 <td>
                                     <asp:TextBox ID="TxtBxMesaj" runat="server" 
                                      Width="412"></asp:TextBox>
                                     <asp:Button ID="BttnGonder" runat="server"
                                      Text="Gönder" Width="55"
                                      OnClick="BttnGonder_click"/>
                                 </td>
                             </tr>
                      </table>
               </ContentTemplate>
            </asp:UpdatePanel>
       </td>
   </tr>

Above is my code, all those controls are in an UpdatePanel so when user clicks BttnGonder that no flickers happens.

When user presses the button what he typed is concataned to TxtBxOdaMesajlari in the below method called BttnGonder_click.

protected void BttnGonder_click(object sender, EventArgs e)
        {
            string uyeId = Session["UyeId"].ToString();
            string mesaj = uyeId + " : " + TxtBxMesaj.Text;
            TxtBxOdaMesajlari.Text = TxtBxOdaMesajlari.Text + Environment.NewLine + mesaj;
            ScriptManager.RegisterStartupScript(this, this.GetType(), "txtbxmesajlarslide", "buttonClicked();", true);

        }  

Well after a number of messages scrollbars appear TxtBxOdaMesajlari can be seen , however the new messages cannot be seen because TxtBxOdaMesajlari does not slide/scroll down automatically.I searched about this and found this example Multi User Chat Room Using ASP.NET 2.0 and AJAX it uses Javascript’s scrollIntoView() so I decided to use it but the page gets flickered and scrolling does not work at all.Maybe I am using the wrong control or the wrong way to do is.
I am using ASP.NET 4.0 if that matters a lot.

On aspx file

<script language="javascript" type="text/javascript">
    function buttonClicked() {
                $get("TxtBxOdaMesajlari").scrollIntoView("true");
            }
</script>

I am using ScriptManager.RegisterStartupScript because the controls are in an UpdatePanel as it was suggested and worked fine at Accepted answer by user:3742 of JavaScript function is not working.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T13:31:55+00:00Added an answer on May 27, 2026 at 1:31 pm

    scrollIntoView is used to scroll the textbox itself into view, not its contents.

    In order to scroll to the end of the textbox, you can use:

    function buttonClicked() {
        var textBox = $get("TxtBxOdaMesajlari");
        textBox.scrollTop = textBox.scrollHeight;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a basic video file using OpenCV (in Python). I have
I am trying to create a basic search function. I have a text field
Question I'm trying to create a basic wxWidgets program with a text entry box,
I'm trying to create a pretty basic chat screen with a ListView displaying the
I am trying to create a basic functionality in AS3. I have a class
I'm trying to create a basic navigation and I'd like to have a horizontal
I'm trying to create a basic system that will allow only specific users to
I'm trying to create a basic shopping cart, having an issue with the product
I'm trying to create a very basic Setup and Deployment project using Visual Studio.
I am trying to just create a basic layout, but i am having trouble

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.