Enterkey of keyboard issues
-
But in my whole application i used default button in log in page...but where in other page its redirecting to other.while clicking enter button of keyboard.
Ch.Gayatri Subudhi wrote:
But in my whole application i used default button in log in page...but where in other page its redirecting to other.
What does it mean? I didn't get your point. :confused: As I already suggested, if Default button is not necessary, you can create one blank control (may be textbox),hide it and focus it on page load. :)
Cheers ! Abhijit Codeproject MVP
-
Sir even though i used javascrip where in my app i used masterpage...still its not working
Ch.Gayatri Subudhi wrote:
Sir even though i used javascrip where in my app i used masterpage...still its not working
What you have done with javascript ? Can you please show us the code ?
Cheers ! Abhijit Codeproject MVP
-
But in my whole application i used default button in log in page...but where in other page its redirecting to other.while clicking enter button of keyboard.but i did not sued ant default button to ant other pages accept login page
looks like you set your Default Button in MasterPage. is that so? that can only carry this to all other pages though you intend to use it in Login page only. Try putting the default button thing in Login Content page.
-
Ch.Gayatri Subudhi wrote:
Sir even though i used javascrip where in my app i used masterpage...still its not working
What you have done with javascript ? Can you please show us the code ?
Cheers ! Abhijit Codeproject MVP
<pre><body OnKeyPress="return disableKeyPress(event)"></pre>
like this i wrote in masterpage</x-turndown> -
looks like you set your Default Button in MasterPage. is that so? that can only carry this to all other pages though you intend to use it in Login page only. Try putting the default button thing in Login Content page.
but in my login page it wont hv masterpage...rest of pages i used master page...
-
Hi.. In my project while i m running the application...whn i m going a particular aspx page and thn click the enter button of keyboard the page is redirecting to another how to stop this without javascript.I need code for this. Thanks in advance. With regards. Ch.Gayatri
I would provide some input. Please check whether it actually helps in your scenario. if you are in "Page.aspx" where on keyboard "enter button" hit takes you to "Wrong.aspx". But you actually want to visit "Right.aspx". Please do following steps, Step 1. In Page.apsx, put "method" and "action" attribute in
tag as mentioned here
Step 2. in @Page directive in Page.aspx, add "EnableViewStateMac" attribute as the following if not already added
EnableViewStateMac="false"
Step 3. In @page directive in "Right.aspx" as set EnableViewStateMac = false. Now hitting "enter button" from keyboard while you are in Page.aspx, will always nagivate you to "Right.aspx" instead of "Wrong.aspx". Please let me know if it helps you.
Thanks, Arindam D Tewary
-
I would provide some input. Please check whether it actually helps in your scenario. if you are in "Page.aspx" where on keyboard "enter button" hit takes you to "Wrong.aspx". But you actually want to visit "Right.aspx". Please do following steps, Step 1. In Page.apsx, put "method" and "action" attribute in
tag as mentioned here
Step 2. in @Page directive in Page.aspx, add "EnableViewStateMac" attribute as the following if not already added
EnableViewStateMac="false"
Step 3. In @page directive in "Right.aspx" as set EnableViewStateMac = false. Now hitting "enter button" from keyboard while you are in Page.aspx, will always nagivate you to "Right.aspx" instead of "Wrong.aspx". Please let me know if it helps you.
Thanks, Arindam D Tewary
while i m running my app...the flow is okay...but whn i clicked the enter button of keyboard i want to stop that action...becoz of that its redirect to anthor page...i need to stay the same page...even i m using masterpage
-
while i m running my app...the flow is okay...but whn i clicked the enter button of keyboard i want to stop that action...becoz of that its redirect to anthor page...i need to stay the same page...even i m using masterpage
Ch.Gayatri Subudhi wrote:
but whn i clicked the enter button of keyboard i want to stop that
Did you mean from clicking mouse things are working but you want to stop doing any thing from "keyboard enter button" hit?
Thanks, Arindam D Tewary
-
Ch.Gayatri Subudhi wrote:
but whn i clicked the enter button of keyboard i want to stop that
Did you mean from clicking mouse things are working but you want to stop doing any thing from "keyboard enter button" hit?
Thanks, Arindam D Tewary
yes sir..how to stop that
-
yes sir..how to stop that
Put this code in your button's onkeypressevent
onkeypress="return eval((event.keyCode==13)?false:true);"
Post back hiting "enter" from keyboard would be stopped but from mouse click flow would be as it is. Please let me know if it helps.
Thanks, Arindam D Tewary
-
Put this code in your button's onkeypressevent
onkeypress="return eval((event.keyCode==13)?false:true);"
Post back hiting "enter" from keyboard would be stopped but from mouse click flow would be as it is. Please let me know if it helps.
Thanks, Arindam D Tewary
Thanks a lot sir..now its working f9..
-
Thanks a lot sir..now its working f9..
You are welcome !!! :-D
Thanks, Arindam D Tewary