Prevent page postback on enter key press in textbox in asp-net web pag(dotnetspidor.blogspot.com)
submitted by
sangam100(357) 2 years, 2 months ago
In an asp.net web page, you may have experienced that pressing enter key postbacks the page. For example, take the following scenario:
In the page, if you press enter key in any of the textboxes, the page will postback, which is not desired. What’s the reason?
Lets look at the html markup generated for the page:
The asp.net button control has been rendered with “submit” type, which is the reason of page postback when enter key is pressed in any of the textboxes.
|category: ASP.NET
|Views: 160
tags:
ASP.NET another
Everyones tags:
Your Tags: