C#中的向下箭头键 [英] Down arrow key in C#

查看:384
本文介绍了C#中的向下箭头键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用dotnet framework 2.0和Visual Studio2005.
对于Web应用程序
我从Oracle数据库绑定了datagrid.在datagrid中,我具有链接按钮,当用户单击链接按钮时,相应的图像将显示在图片框中.
我的要求是
当用户按下键盘上的向下按钮时,下一行的图像应填充在图片框中.在

I am using dotnet framework 2.0 and Visual Studio 2005.
For a web application
I bound datagrid from oracle database. In datagrid I have link button and when the user clicks the link button corresponding image will be displayed in Picture box.
My requirement is
When the user presses the down button key in keyboard, the next row''s image should be populated in picture box. In

OnItemCommand="grdCoverDetails_ItemCommand"


中 我从Oracle DB检索数据并将其显示在图片框中.
我可以通过按下按钮键来调用


I retrieve data from Oracle DB and display it in Picture box.
Can I call that

grdCoverDetails_ItemCommand 

吗?请提出建议.
谢谢

by pressing down button key? Please suggest.
Thanks

推荐答案

您可以使用javascript捕获客户端的按下按键事件. [ ^ ] W3Schools页面上有一个有关如何执行此操作的简单示例.

捕获事件后,需要使用__doPostback函数调用grdCoverDetails_ItemCommand.使用 [
You can capture the down-key press event on the client side using javascript. This[^] W3Schools page has a simple example on how to do that.

Once you have captured the event, you need to call the grdCoverDetails_ItemCommand using the __doPostback function. Use this[^] CodeProject article as reference.


这篇关于C#中的向下箭头键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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