Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > keydown event

Reply
Thread Tools

keydown event

 
 
Claudia Fong
Guest
Posts: n/a
 
      09-17-2007
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 ***
 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      09-17-2007
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" <(E-Mail Removed)> wrote in message
news:O9AVoeT%(E-Mail Removed)...
> 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 ***



 
Reply With Quote
 
 
 
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      09-17-2007
"Claudia Fong" <(E-Mail Removed)> wrote in message
news:O9AVoeT%(E-Mail Removed)...

> 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

 
Reply With Quote
 
Claudia Fong
Guest
Posts: n/a
 
      09-18-2007
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 ***
 
Reply With Quote
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      09-18-2007
"Claudia Fong" <(E-Mail Removed)> wrote in message
news:OgH$dqc%(E-Mail Removed)...

> 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

 
Reply With Quote
 
Claudia Fong
Guest
Posts: n/a
 
      09-18-2007
When I said that it does not support is because I can't download
anything to the PDA.. I can only use the original PIE.. and with this
one, the javascript I wrote doesn't work..

document.onkeydown = keydown;
function keydown(evt)
{
if (!evt)
evt = event;


//if (evt.shiftKey && evt.keyCode == 9)
// if (evt.shiftKey && evt.keyCode == 32)
if (evt.ctrlKey && evt.keyCode == 65)
{
myfunction()

}
}

function myfunction()
{
window.open("Language.aspx", '_blank');
window.opener='x';window.close();
}


Cheers!

Claudi

*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
KeyDown event on Smartphones Atul Thombre ASP .Net Mobile 0 09-11-2008 12:42 PM
Keydown event problem when enter key is pressed Gouri.Mahajan7@gmail.com ASP .Net 1 05-23-2008 12:20 PM
trap keypress and keydown event in asp.net mobile form jaspal singh ASP .Net Mobile 1 11-27-2006 06:17 AM
programmatic firing of keydown event runner7 Javascript 9 09-11-2006 12:47 AM
Keydown Event and Focus Problem mee-shell Python 0 10-23-2004 01:07 AM



Advertisments