Prevent page postback on enter key press in textbox in asp-net web pag(dotnetspidor.blogspot.com)

submitted by sangam100sangam100(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.

add a comment |category: |Views: 160

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

No comments so far

information Login or create an account to comment on this story