在GridView中按ENTER键更新 [英] Update on ENTER key press in GridView

查看:94
本文介绍了在GridView中按ENTER键更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在GridView中更新"Enter Key"新闻上的记录时遇到问题.

我通过JavaScript使用文本框的onkeyPress事件执行更新操作.当我在同一页面上放置一个新的服务器控制按钮,然后Enter键按下事件的执行方式有所不同时,就会出现问题.

它首先转到JS代码,然后执行按钮单击事件,那时候我不想执行该操作.

请帮帮我.

谢谢.

问候,
Prathamesh

Hi all,

I have an issue with updating a record on ''Enter Key'' press in GridView.

I do my update action with a textbox''s onkeyPress event, through JavaScript. The problem comes when I place a new server control button on the same page, and then the Enter Key press event performs differently.

It first goes to the JS code and then it performs the button click event, which I don''t want to excute at that time.

Please help me.

Thank you.

Regards,
Prathamesh

推荐答案

该按钮充当该页面的默认操作.设置UseSubmitBehavior = false或使用输入元素而不是ASP.NET按钮
The button is acting as the default action for that page. Set UseSubmitBehavior=false or use an input element rather than an ASP.NET button


这篇关于在GridView中按ENTER键更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆