This are very easy things to do,
when we open any page and we want particular textbox contains cursor & after pressing enter button particular button gets clicked then do the following things.
In asp.net page contains a form tag, It contains defaultbutton & defaultfocus attributes set it as per your requirement
defaultbutton:= give your buttons name which u want to clicked
defaultfocus:= give control name for which you want focus after page load
Happy Coding !!
when we open any page and we want particular textbox contains cursor & after pressing enter button particular button gets clicked then do the following things.
In asp.net page contains a form tag, It contains defaultbutton & defaultfocus attributes set it as per your requirement
defaultbutton:= give your buttons name which u want to clicked
defaultfocus:= give control name for which you want focus after page load
<form id="form1" runat="server" defaultbutton="Button1" defaultfocus="TextBox1">Here TextBox1 contains cursor & after press enter Button1's click event gets called.
Happy Coding !!
No comments:
Post a Comment