Click here to Skip to main content
15,887,376 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionHow to display image in a treeview from database Pin
Zahid Hayat29-Sep-15 21:41
Zahid Hayat29-Sep-15 21:41 
AnswerRe: How to display image in a treeview from database Pin
Blikkies29-Sep-15 22:55
professionalBlikkies29-Sep-15 22:55 
GeneralRe: How to display image in a treeview from database Pin
Zahid Hayat30-Sep-15 2:56
Zahid Hayat30-Sep-15 2:56 
Questionhow to highlight the search result in datagridview using c#. Pin
Member 1201610628-Sep-15 0:15
Member 1201610628-Sep-15 0:15 
AnswerRe: how to highlight the search result in datagridview using c#. Pin
taleebanwar28-Sep-15 21:54
taleebanwar28-Sep-15 21:54 
GeneralRe: how to highlight the search result in datagridview using c#. Pin
Member 1201610630-Sep-15 15:27
Member 1201610630-Sep-15 15:27 
Questionwhen I press ENTER search button it automatically opening another page. why is that so? Pin
geetha2727-Sep-15 21:42
geetha2727-Sep-15 21:42 
AnswerRe: when I press ENTER search button it automatically opening another page Pin
Afzaal Ahmad Zeeshan27-Sep-15 22:11
professionalAfzaal Ahmad Zeeshan27-Sep-15 22:11 
Simple, it submits your data. The "another page" would be the page where your form has to land after submission. Preventing the user from submitting a form via Enter key, is a bad UX, in my opinion. User would want to use keyboard for the submission process and you would be preventing him from doing so.

I have never used ASP.NET Web Forms, but I do know that even that form gets translated to HTML while rendering, so you can control that via JavaScript. Following script would suffice.
JavaScript
// jQuery code
$('input[type="text"]').keydown(function (e) {
   if(e.which == 13) {
      // Enter key pressed
      return false;
   }
});

This would do the trick for you, but I would suggest that you do not do so. Let user submit the form using Enter key. Smile | :)
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~

GeneralRe: when I press ENTER search button it automatically opening another page Pin
Member 1201610628-Sep-15 0:06
Member 1201610628-Sep-15 0:06 
AnswerRe: when I press ENTER search button it automatically opening another page. why is that so? Pin
F-ES Sitecore27-Sep-15 22:42
professionalF-ES Sitecore27-Sep-15 22:42 
GeneralRe: when I press ENTER search button it automatically opening another page. why is that so? Pin
Member 1201610628-Sep-15 0:07
Member 1201610628-Sep-15 0:07 
GeneralRe: when I press ENTER search button it automatically opening another page. why is that so? Pin
F-ES Sitecore28-Sep-15 0:15
professionalF-ES Sitecore28-Sep-15 0:15 
GeneralRe: when I press ENTER search button it automatically opening another page. why is that so? Pin
Member 1201610628-Sep-15 0:27
Member 1201610628-Sep-15 0:27 
QuestionIsPostBack Pin
Member 1116162527-Sep-15 19:26
Member 1116162527-Sep-15 19:26 
AnswerRe: IsPostBack Pin
Richard MacCutchan27-Sep-15 21:44
mveRichard MacCutchan27-Sep-15 21:44 
AnswerRe: IsPostBack Pin
PANKAJMAURYA27-Sep-15 22:00
professionalPANKAJMAURYA27-Sep-15 22:00 
AnswerRe: IsPostBack Pin
deepankarbhatnagar30-Sep-15 2:39
professionaldeepankarbhatnagar30-Sep-15 2:39 
AnswerRe: IsPostBack Pin
sridhar_thota7-Oct-15 21:16
sridhar_thota7-Oct-15 21:16 
QuestionHtmlTextWriter vs HtmlTable.RenderControl Pin
dashing_inn200323-Sep-15 17:57
professionaldashing_inn200323-Sep-15 17:57 
AnswerRe: HtmlTextWriter vs HtmlTable.RenderControl Pin
Richard MacCutchan23-Sep-15 21:45
mveRichard MacCutchan23-Sep-15 21:45 
QuestionHow to display results based on employees manager and department Pin
samflex22-Sep-15 17:23
samflex22-Sep-15 17:23 
AnswerRe: How to display results based on employees manager and department Pin
Herman<T>.Instance23-Sep-15 0:24
Herman<T>.Instance23-Sep-15 0:24 
SuggestionRe: How to display results based on employees manager and department Pin
Richard Deeming23-Sep-15 1:55
mveRichard Deeming23-Sep-15 1:55 
GeneralRe: How to display results based on employees manager and department Pin
samflex23-Sep-15 2:37
samflex23-Sep-15 2:37 
AnswerRe: How to display results based on employees manager and department Pin
F-ES Sitecore23-Sep-15 5:56
professionalF-ES Sitecore23-Sep-15 5:56 

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.