Click here to Skip to main content
15,921,530 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralGet IP address Pin
marky77727-Jan-08 23:56
marky77727-Jan-08 23:56 
GeneralRe: Get IP address Pin
N a v a n e e t h28-Jan-08 0:11
N a v a n e e t h28-Jan-08 0:11 
GeneralRe: Get IP address Pin
bhanu1234528-Jan-08 21:13
bhanu1234528-Jan-08 21:13 
GeneralPeachTree / ASP.NET Pin
payback27-Jan-08 23:48
payback27-Jan-08 23:48 
GeneralRe: PeachTree / ASP.NET Pin
Vasudevan Deepak Kumar28-Jan-08 2:22
Vasudevan Deepak Kumar28-Jan-08 2:22 
QuestionHow to convert PDF files to HTML , using DotNet for web/desk top applications Pin
Sophia Rekhi27-Jan-08 23:19
Sophia Rekhi27-Jan-08 23:19 
GeneralASCII value Pin
yogeshpan27-Jan-08 23:15
yogeshpan27-Jan-08 23:15 
AnswerRe: ASCII value Pin
newc127-Jan-08 23:37
newc127-Jan-08 23:37 
Hi Raushan,

When a user hits a key on the keyboard, a client-side event is fired. The server is not used to capture or use this information as the server is simply recieving a request from the client (through the HTTP GET and POST protocols). Therefore you should focus on capturing and handling keyboard strokes on the client-side. The DOM's event object should provide you with the information you need when used in conjuction with the DOM onkeydown event (this is the event that is fired when a user hits a key). The following code shows an example of how to achieve this:

Function to handle the key stroke:
function checkKeyStroke(e) {<br />
  var characterCode;<br />
<br />
  if ( e && e.which ) {<br />
    e = e;<br />
    characterCode = e.which;<br />
  }<br />
  else {<br />
    e = event;<br />
    characterCode = e.keyCode;<br />
  }<br />
<br />
  if ( characterCode == 13 ) { // 13 is the ASCII character code for the enter key<br />
    // Add logic here to handle the key stroke<br />
 }<br />
}


Attach it to the onkeydown event of the required element, in this case the body element:
<body onkeydown="checkKeyStroke(event); ">

Clean code is the key to happiness.

GeneralPressing Enter Key Throwing on the Home Page Pin
.NET- India 27-Jan-08 23:11
.NET- India 27-Jan-08 23:11 
GeneralRe: Pressing Enter Key Throwing on the Home Page Pin
yogeshpan27-Jan-08 23:16
yogeshpan27-Jan-08 23:16 
GeneralRe: Pressing Enter Key Throwing on the Home Page Pin
Vasudevan Deepak Kumar28-Jan-08 0:09
Vasudevan Deepak Kumar28-Jan-08 0:09 
AnswerRe: Pressing Enter Key Throwing on the Home Page Pin
newc128-Jan-08 0:42
newc128-Jan-08 0:42 
QuestionBinding Dropdownlist to gridview column...... Pin
pranavcool27-Jan-08 22:16
pranavcool27-Jan-08 22:16 
AnswerRe: Binding Dropdownlist to gridview column...... Pin
newc127-Jan-08 23:18
newc127-Jan-08 23:18 
GeneralProblem in creating menu items using XML Pin
dipak.dipak27-Jan-08 21:19
dipak.dipak27-Jan-08 21:19 
GeneralRe: Problem in creating menu items using XML Pin
Paddy Boyd27-Jan-08 22:50
Paddy Boyd27-Jan-08 22:50 
GeneralOpening a view new grid view within a grid view Pin
Anuradha61227-Jan-08 21:18
Anuradha61227-Jan-08 21:18 
GeneralRe: Opening a view new grid view within a grid view Pin
N a v a n e e t h27-Jan-08 21:50
N a v a n e e t h27-Jan-08 21:50 
GeneralASP.NEt editing gridview cells Pin
cool8327-Jan-08 20:54
cool8327-Jan-08 20:54 
QuestionGridView Paging Pin
AS@1327-Jan-08 20:34
AS@1327-Jan-08 20:34 
GeneralRe: GridView Paging Pin
N a v a n e e t h27-Jan-08 21:46
N a v a n e e t h27-Jan-08 21:46 
GeneralRe: GridView Paging Pin
AS@1327-Jan-08 23:17
AS@1327-Jan-08 23:17 
GeneralRe: GridView Paging Pin
Venkatesh Mookkan27-Jan-08 21:49
Venkatesh Mookkan27-Jan-08 21:49 
GeneralRe: GridView Paging Pin
Anuradha61227-Jan-08 21:54
Anuradha61227-Jan-08 21:54 
QuestionHow to Use Subreports in List to acheive ReportViewer Drillthrough Reports Functionality Pin
Bhaskar14198527-Jan-08 19:43
Bhaskar14198527-Jan-08 19:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.