hi guys,
I was able to solve the problem with a help of a friend. Here it goes.
1. Control declaration:
<asp:TextBox ID="txtMsg" runat="server" TextMode="MultiLine" style="overflow:hidden" onkeyup="AutoExpand(this)" Rows="2" />
2. JavaScript function:
function AutoExpand(txtbox)
{
txtbox.style.height = "1px";
txtbox.style.height = (25 + txtbox.scrollHeight) + "px";
}