TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
amit shukla
NA
78
66.7k
Handle enter key press with two button.
Oct 25 2016 3:20 AM
hello friends
Today i am facing a problem given below.
in asp.net page , we take two button and one textbox on a asp.net page.
we want to manage enter key press on textbox , but when we press enter key on textbox
then automatically another button click event is call and textbox key up event is not call .
so please help this.
example :
<asp:TextBox ID="txtProjectName" runat="server" placeholder="Project Number"></asp:TextBox>
<asp:Button runat="server" ID="btnSerach" OnClientClick="return vallidateFields();" OnClick="btnSerach_Click" />
<asp:Button ID="txtY" class="btn blue" Text="Yes" runat="server" OnClientClick="return vallidatePopUpFields();" OnClick="txtY_Click" />
when we press enter on textbox then call button click event but we want to call below code
$('#<%=txtProjectName.ClientID%>').keyup(function (e) {
debugger
if(e.keyCode == 13)
{
$('#<%=btnSerach.ClientID%>').click();
}
});
Reply
Answers (
3
)
check box list is not woking in my view
How to create a responsive grid in asp using bootstrap