Click here to Skip to main content
15,860,859 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionAvoid Refer of page on Menu Item click. Pin
Member 322226428-Nov-11 2:23
Member 322226428-Nov-11 2:23 
AnswerRe: Avoid Refer of page on Menu Item click. Pin
Anuj Banka28-Nov-11 2:45
Anuj Banka28-Nov-11 2:45 
AnswerRe: Avoid Refer of page on Menu Item click. Pin
Not Active28-Nov-11 6:28
mentorNot Active28-Nov-11 6:28 
Questionasp.net keypress event Pin
berba28-Nov-11 1:11
berba28-Nov-11 1:11 
AnswerRe: asp.net keypress event Pin
StianSandberg28-Nov-11 2:36
StianSandberg28-Nov-11 2:36 
AnswerRe: asp.net keypress event Pin
ksvinothmca28-Nov-11 2:39
ksvinothmca28-Nov-11 2:39 
AnswerRe: asp.net keypress event Pin
Not Active28-Nov-11 6:29
mentorNot Active28-Nov-11 6:29 
AnswerRe: asp.net keypress event Pin
Morgs Morgan29-Nov-11 0:49
Morgs Morgan29-Nov-11 0:49 
Use a javascript/jquery function to achieve this:
1. HTML Mockup
JavaScript
<input id="txtNumbersOnly" runat="server" onkeypress="Validate($(this));" />


Above, "onkeypress" is the client-side keypress event. For more accuracy, you could replace "onkeypress" with "onkeyup" which only fires when you let go of a "key" (on your keyboard).
2. Javascript/jQuery
JavaScript
function Validate( sender )
{
   if( parseInt( sender.val() ) )
   {
      //proceed with the intended operation
   }
   else
   {
      alert( 'Sorry, only whole numbers are allowed in this input field. Please try again.' );
   }
}

QuestionScrolling to a specific row in a DataGridView in a Web Form (not a Windows Form) using C# Pin
Steve Taylor (Glasgow)27-Nov-11 23:59
Steve Taylor (Glasgow)27-Nov-11 23:59 
AnswerRe: Scrolling to a specific row in a DataGridView in a Web Form (not a Windows Form) using C# Pin
StianSandberg28-Nov-11 2:39
StianSandberg28-Nov-11 2:39 
QuestionSyntax Question [SOLVED] Pin
Richard Andrew x6427-Nov-11 8:27
professionalRichard Andrew x6427-Nov-11 8:27 
AnswerRe: Syntax Question Pin
Richard Andrew x6427-Nov-11 10:07
professionalRichard Andrew x6427-Nov-11 10:07 
General2010 validation control Pin
dcof26-Nov-11 11:47
dcof26-Nov-11 11:47 
GeneralRe: 2010 validation control Pin
Not Active26-Nov-11 12:25
mentorNot Active26-Nov-11 12:25 
GeneralRe: 2010 validation control Pin
dcof27-Nov-11 13:15
dcof27-Nov-11 13:15 
QuestionEmbedded image in portable area not showing on deployment Pin
AumSingh25-Nov-11 6:05
professionalAumSingh25-Nov-11 6:05 
AnswerRe: Embedded image in portable area not showing on deployment Pin
jkirkerx25-Nov-11 19:25
professionaljkirkerx25-Nov-11 19:25 
GeneralRe: Embedded image in portable area not showing on deployment Pin
AumSingh25-Nov-11 22:07
professionalAumSingh25-Nov-11 22:07 
GeneralRe: Embedded image in portable area not showing on deployment Pin
jkirkerx26-Nov-11 6:48
professionaljkirkerx26-Nov-11 6:48 
GeneralRe: Embedded image in portable area not showing on deployment Pin
AumSingh26-Nov-11 7:40
professionalAumSingh26-Nov-11 7:40 
GeneralRe: Embedded image in portable area not showing on deployment Pin
jkirkerx26-Nov-11 12:33
professionaljkirkerx26-Nov-11 12:33 
GeneralRe: Embedded image in portable area not showing on deployment Pin
AumSingh26-Nov-11 17:13
professionalAumSingh26-Nov-11 17:13 
GeneralRe: Embedded image in portable area not showing on deployment Pin
jkirkerx26-Nov-11 19:35
professionaljkirkerx26-Nov-11 19:35 
GeneralRe: Embedded image in portable area not showing on deployment Pin
AumSingh27-Nov-11 6:05
professionalAumSingh27-Nov-11 6:05 
GeneralRe: Embedded image in portable area not showing on deployment Pin
jkirkerx27-Nov-11 8:51
professionaljkirkerx27-Nov-11 8:51 

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.