Skip to main content

Posts

Showing posts with the label usercontrols

JavaScript method not working in ASP.NET User Control

I asked a question before about a JavaScript code you can see it here : How can I scroll down to a multiline TextBox's bottom line, Javascript's scrollIntoView is not working for this . Well, it was solved and the accepted answer was working. Afterwards I had to move the code part you can see in that question to a User Control which finally looked like this : <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="LiveChatPart.ascx.cs" Inherits="BeyzamComArayuz.LiveChatUserControl.LiveChatPart" %> <%@ Register src="/LiveChatUserControl/GenelOdaFlashPart.ascx" tagname="GenelOdaFlash" tagprefix="gOF" %> <script language="javascript" type="text/javascript"> function buttonClicked() { // var el = document.getElementById("TxtBxOdaMesajlari"); var textBox = $get("TxtBxOdaMesajlari"); textBox.scrollTop = textBox.scrollHeigh