sir my textbox is multiline,its not work on multiline textbox.
on both textbox enter key press , it's going to save1 event only??
<script type="text/javascript">
$(function () {
$('[id*=txtboxchat]').keypress(function (e) {
debugger;
if (e.keyCode == 13) {
$('[id*= btnsavechat]').trigger('click');
}
});
$('[id*=txtboxchat1]').keypress(function (e) {
debugger;
if (e.keyCode == 13) {
$('[id*= btnsavechat1]').trigger('click');
}
});
});
</script>
<asp:Button ID="btnsavechat1" runat="server" Style="display: none" Text="Button"
OnClick="Save1" />
<asp:Button ID="btnsavechat" runat="server" Style="display: none" Text="Button" OnClick="Save" />
protected void Save(object sender, EventArgs e)
{
ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<script>alert('here i will add code in databse for client,just to sample here');</script>", false);
}
protected void Save1(object sender, EventArgs e)
{
ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<script>alert('here i will add code in databse for consultant,just to sample here');</script>", false);
}