Click here to Skip to main content
15,113,057 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionAvoid Refer of page on Menu Item click. Pin
Member 322226428-Nov-11 3:23
MemberMember 322226428-Nov-11 3:23 
AnswerRe: Avoid Refer of page on Menu Item click. Pin
Anuj Banka28-Nov-11 3:45
MemberAnuj Banka28-Nov-11 3:45 
AnswerRe: Avoid Refer of page on Menu Item click. Pin
Not Active28-Nov-11 7:28
mentorNot Active28-Nov-11 7:28 
Questionasp.net keypress event Pin
berba28-Nov-11 2:11
Memberberba28-Nov-11 2:11 
AnswerRe: asp.net keypress event Pin
StianSandberg28-Nov-11 3:36
MemberStianSandberg28-Nov-11 3:36 
AnswerRe: asp.net keypress event Pin
ksvinothmca28-Nov-11 3:39
Memberksvinothmca28-Nov-11 3:39 
AnswerRe: asp.net keypress event Pin
Not Active28-Nov-11 7:29
mentorNot Active28-Nov-11 7:29 
AnswerRe: asp.net keypress event Pin
Morgs Morgan29-Nov-11 1:49
MemberMorgs Morgan29-Nov-11 1: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)28-Nov-11 0:59
MemberSteve Taylor (Glasgow)28-Nov-11 0:59 
AnswerRe: Scrolling to a specific row in a DataGridView in a Web Form (not a Windows Form) using C# Pin
StianSandberg28-Nov-11 3:39
MemberStianSandberg28-Nov-11 3:39 
QuestionSyntax Question [SOLVED] Pin
Richard Andrew x6427-Nov-11 9:27
professionalRichard Andrew x6427-Nov-11 9:27 
AnswerRe: Syntax Question Pin
Richard Andrew x6427-Nov-11 11:07
professionalRichard Andrew x6427-Nov-11 11:07 
General2010 validation control Pin
dcof26-Nov-11 12:47
Memberdcof26-Nov-11 12:47 
GeneralRe: 2010 validation control Pin
Not Active26-Nov-11 13:25
mentorNot Active26-Nov-11 13:25 
GeneralRe: 2010 validation control Pin
dcof27-Nov-11 14:15
Memberdcof27-Nov-11 14:15 
QuestionEmbedded image in portable area not showing on deployment Pin
AumSingh25-Nov-11 7:05
professionalAumSingh25-Nov-11 7:05 
AnswerRe: Embedded image in portable area not showing on deployment Pin
jkirkerx25-Nov-11 20:25
professionaljkirkerx25-Nov-11 20:25 
GeneralRe: Embedded image in portable area not showing on deployment Pin
AumSingh25-Nov-11 23:07
professionalAumSingh25-Nov-11 23:07 
GeneralRe: Embedded image in portable area not showing on deployment Pin
jkirkerx26-Nov-11 7:48
professionaljkirkerx26-Nov-11 7:48 
GeneralRe: Embedded image in portable area not showing on deployment Pin
AumSingh26-Nov-11 8:40
professionalAumSingh26-Nov-11 8:40 
GeneralRe: Embedded image in portable area not showing on deployment Pin
jkirkerx26-Nov-11 13:33
professionaljkirkerx26-Nov-11 13:33 
GeneralRe: Embedded image in portable area not showing on deployment Pin
AumSingh26-Nov-11 18:13
professionalAumSingh26-Nov-11 18:13 
GeneralRe: Embedded image in portable area not showing on deployment Pin
jkirkerx26-Nov-11 20:35
professionaljkirkerx26-Nov-11 20:35 
GeneralRe: Embedded image in portable area not showing on deployment Pin
AumSingh27-Nov-11 7:05
professionalAumSingh27-Nov-11 7:05 
GeneralRe: Embedded image in portable area not showing on deployment Pin
jkirkerx27-Nov-11 9:51
professionaljkirkerx27-Nov-11 9: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.