473,378 Members | 1,355 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

keydown event

Hi, in my C# application I have the following keydown event

private void Form1_KeyDown(object sender, KeyEventArgs e)
{
if (e.Modifiers == Keys.Alt && e.KeyCode == Keys.A)
MessageBox.Show("Combination of ALt and A pressed");
else if (e.Modifiers == Keys.Alt && e.KeyCode == Keys.F1)
MessageBox.Show("Combination of ALt and F1 pressed");
}

I was wondering if I can do the same with asp.net?
Cheers!

Claudi

*** Sent via Developersdex http://www.developersdex.com ***
Sep 17 '07 #1
4 3462
Yes, but in Javascript instead of C#.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Claudia Fong" <cd********@yahoo.co.ukwrote in message
news:O9***************@TK2MSFTNGP05.phx.gbl...
Hi, in my C# application I have the following keydown event

private void Form1_KeyDown(object sender, KeyEventArgs e)
{
if (e.Modifiers == Keys.Alt && e.KeyCode == Keys.A)
MessageBox.Show("Combination of ALt and A pressed");
else if (e.Modifiers == Keys.Alt && e.KeyCode == Keys.F1)
MessageBox.Show("Combination of ALt and F1 pressed");
}

I was wondering if I can do the same with asp.net?
Cheers!

Claudi

*** Sent via Developersdex http://www.developersdex.com ***

Sep 17 '07 #2
"Claudia Fong" <cd********@yahoo.co.ukwrote in message
news:O9***************@TK2MSFTNGP05.phx.gbl...
I was wondering if I can do the same with asp.net?
Yep - in JavaScript, obviously...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 17 '07 #3
WELL..is there other option?
Because pocket internet explorer does not support javascript.. at least
the code that I'm writing.. because I already tried

Cheers!

Claudi

*** Sent via Developersdex http://www.developersdex.com ***
Sep 18 '07 #4
"Claudia Fong" <cd********@yahoo.co.ukwrote in message
news:Og****************@TK2MSFTNGP02.phx.gbl...
WELL..is there other option?
No.
Because pocket internet explorer does not support javascript..
There was no mention of Pocket Internet Explorer in your original post...

However, Microsoft Internet Explorer for Pocket PCs enables JScript support:
http://www.microsoft.com/technet/arc....mspx?mfr=true
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 18 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: bardo | last post by:
I have a Datagrid that is inside a panel. I want to use the keyDown event to reconize the arrow keys. But I have no luck at all. The problem is that the keydown event won't fire at all, unless I...
4
by: Tony | last post by:
I'm building a simple "breakout" style video-game, and I want keyboard control of the paddle. What I need is for an event handler to respond whenever a key is pressed, regardless of what the...
4
by: Anne | last post by:
hie again, i have 3 textbox and i would like the user to go to the next textbox by pressing the 'ENTER' key. i have tried using this: Private Sub txtRequestor_KeyDown(ByVal sender As...
4
by: ShaneO | last post by:
I would like to handle the KeyUp & KeyDown events in the same event handler but can't find how to determine which event was fired - Private Sub ListBox1_KeyUp(ByVal sender As Object, ByVal e As...
1
by: fripper | last post by:
I have a VB 2005 windows app and I want to recognize keydown events. I have a form key down event handler but it does not get control when a key is depressed. In playing around I found that if I...
0
by: tony | last post by:
Hello!! I have a derived class called StringClassEditor which inherit from UITypeEditor listed below. Now to my question in method EditValue in this class I have this statement lb.KeyDown ...
3
by: MLM450 | last post by:
I have a control that handles the KeyDown event but it does not seem to execute when a combination of keys is pressed - like CTRL+Z. If I press CTRL, it executes. If I press Z, it executes. But the...
3
by: win | last post by:
when the cursor is in a textbox, only coding in the keydown event of the textbox triggered, the coding in the keydown event of the form does not triggered! Problem: I need to change a VB6 program...
2
by: Tony Johansson | last post by:
Hello! I have created a Control that consist of a label and a textbox.I have called this class ctlLabelTextbox. public partial class ctlLabelTextbox : UserControl { .... } The class that I...
14
by: raylopez99 | last post by:
KeyDown won't work KeyPress fails KeyDown not seen inspired by a poster here:http://tinyurl.com/62d97l I found some interesting stuff, which I reproduce below for newbies like me. The main...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.