473,606 Members | 2,381 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

[ENTER] key causing major headaches.

Hi All,

I'm very experienced in traditional ASP and am new to (am learning) ASP.NET.
FYI: I am initially learning ASP.NET with VB.NET to ease the transition for
me. I have encountered what I believe to be a huge limitation with ASP.NET
and I'm wondering how you have handeled this problem.

Let's suppose you have a page where the user can do one of two things: add a
"Category", or add a "Movie Title" to an already existing category. This is
just a make-believe scenario that I'm using to make a point: You have two
distinct sections to your page... one section contains a text box and a
button (for adding a new category) and another section contains a dropdown
menu of categories, a text box, and a different button (for adding a new
movie title).

You can have have the Click event of the first button ("bAddCategory" )
handle the addition of the new category, and you can have the Click event of
the second button ("bAddMovie" ) add the new movie title. So far, so good.

My problem is this: what if the user presses the [ENTER] key on his/her
keyboard? Doing this does not fire either Click event. I can (in essence)
make a "default" button by adding the following to the server-side Load
event for the page:

Page.RegisterHi ddenField("__EV ENTTARGET", bAddMovie.Clien tID)

Doing this will cause the Click event for bAddMovie to fire when the user
presses [ENTER]. However... I don't want bAddMovie to be the default button
if the user is in the process of typing a new category name (in that case, I
obviously would want bAddCategory to be the default).

In traditional ASP, I would simply have two <form>s on the page. One <form>
would encapsulate the widgets for entering a category and a second <form>
would encapsulate the widgets for entering a movie. Each of the two <form>
tags would contain a <input type="hidden"> element containing a name/value
pair indicating which form was submitted on postback.

In ASP.NET, I see no way to emulate this concept. ASP.NET does not let me
have two form tags (with runat="server" defined). And, if I use a
client-side (traditional) <form>, I cannot use any of the ASP.NET web
controls (like <asp:DropDownLi st>, etc.). Not being able to use these web
controls, to me, defeats the whole purpose of using ASP.NET. If I revert
back to a traditional <form> tag, I don't get events, viewstates, or any
other fancy ASP.NET features.

This concept (of having two forms) is extremely important to me. What do I
do!? Any and all help is very much appreciated!!
Regards,

Eric
Nov 18 '05 #1
5 2932
As you can do in Legacy ASP, try client-side script to control the OnKeyPress
event of the form elements you want to capture the ENTER key for and simulate a
button-click event for the element you want to click :)

Mythran

"Eric" <ej************ **********@mail blocks.com> wrote in message
news:ex******** ******@TK2MSFTN GP11.phx.gbl...
Hi All,

I'm very experienced in traditional ASP and am new to (am learning) ASP.NET.
FYI: I am initially learning ASP.NET with VB.NET to ease the transition for
me. I have encountered what I believe to be a huge limitation with ASP.NET
and I'm wondering how you have handeled this problem.

Let's suppose you have a page where the user can do one of two things: add a
"Category", or add a "Movie Title" to an already existing category. This is
just a make-believe scenario that I'm using to make a point: You have two
distinct sections to your page... one section contains a text box and a
button (for adding a new category) and another section contains a dropdown
menu of categories, a text box, and a different button (for adding a new
movie title).

You can have have the Click event of the first button ("bAddCategory" )
handle the addition of the new category, and you can have the Click event of
the second button ("bAddMovie" ) add the new movie title. So far, so good.

My problem is this: what if the user presses the [ENTER] key on his/her
keyboard? Doing this does not fire either Click event. I can (in essence)
make a "default" button by adding the following to the server-side Load
event for the page:

Page.RegisterHi ddenField("__EV ENTTARGET", bAddMovie.Clien tID)

Doing this will cause the Click event for bAddMovie to fire when the user
presses [ENTER]. However... I don't want bAddMovie to be the default button
if the user is in the process of typing a new category name (in that case, I
obviously would want bAddCategory to be the default).

In traditional ASP, I would simply have two <form>s on the page. One <form>
would encapsulate the widgets for entering a category and a second <form>
would encapsulate the widgets for entering a movie. Each of the two <form>
tags would contain a <input type="hidden"> element containing a name/value
pair indicating which form was submitted on postback.

In ASP.NET, I see no way to emulate this concept. ASP.NET does not let me
have two form tags (with runat="server" defined). And, if I use a
client-side (traditional) <form>, I cannot use any of the ASP.NET web
controls (like <asp:DropDownLi st>, etc.). Not being able to use these web
controls, to me, defeats the whole purpose of using ASP.NET. If I revert
back to a traditional <form> tag, I don't get events, viewstates, or any
other fancy ASP.NET features.

This concept (of having two forms) is extremely important to me. What do I
do!? Any and all help is very much appreciated!!
Regards,

Eric

Nov 18 '05 #2
Yeah... I figured I might have to do something like this, but honestly, I
hate the idea that if the client has javascript disabled (or doesn't support
it) then the page is not-only non-functional but actually functions
incorrectly (forms are submitted with no server-side code to handle it).

Thanks for the suggestion. I don't think there will be another way!

Eric
"Mythran" <ki********@hot mail.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
As you can do in Legacy ASP, try client-side script to control the OnKeyPress event of the form elements you want to capture the ENTER key for and simulate a button-click event for the element you want to click :)

Mythran

"Eric" <ej************ **********@mail blocks.com> wrote in message
news:ex******** ******@TK2MSFTN GP11.phx.gbl...
Hi All,

I'm very experienced in traditional ASP and am new to (am learning) ASP.NET. FYI: I am initially learning ASP.NET with VB.NET to ease the transition for me. I have encountered what I believe to be a huge limitation with ASP.NET and I'm wondering how you have handeled this problem.

Let's suppose you have a page where the user can do one of two things: add a "Category", or add a "Movie Title" to an already existing category. This is just a make-believe scenario that I'm using to make a point: You have two distinct sections to your page... one section contains a text box and a
button (for adding a new category) and another section contains a dropdown menu of categories, a text box, and a different button (for adding a new
movie title).

You can have have the Click event of the first button ("bAddCategory" )
handle the addition of the new category, and you can have the Click event of the second button ("bAddMovie" ) add the new movie title. So far, so good.
My problem is this: what if the user presses the [ENTER] key on his/her
keyboard? Doing this does not fire either Click event. I can (in essence) make a "default" button by adding the following to the server-side Load
event for the page:

Page.RegisterHi ddenField("__EV ENTTARGET", bAddMovie.Clien tID)

Doing this will cause the Click event for bAddMovie to fire when the user presses [ENTER]. However... I don't want bAddMovie to be the default button if the user is in the process of typing a new category name (in that case, I obviously would want bAddCategory to be the default).

In traditional ASP, I would simply have two <form>s on the page. One <form> would encapsulate the widgets for entering a category and a second <form> would encapsulate the widgets for entering a movie. Each of the two <form> tags would contain a <input type="hidden"> element containing a name/value pair indicating which form was submitted on postback.

In ASP.NET, I see no way to emulate this concept. ASP.NET does not let me have two form tags (with runat="server" defined). And, if I use a
client-side (traditional) <form>, I cannot use any of the ASP.NET web
controls (like <asp:DropDownLi st>, etc.). Not being able to use these web controls, to me, defeats the whole purpose of using ASP.NET. If I revert back to a traditional <form> tag, I don't get events, viewstates, or any
other fancy ASP.NET features.

This concept (of having two forms) is extremely important to me. What do I do!? Any and all help is very much appreciated!!
Regards,

Eric


Nov 18 '05 #3
Well Everyone,

I believe I've stumbled upon an acceptable solution. For the
curious-minded...

An obvious solution would be to disable the [ENTER] button entirely. Doing
this with javascript however, is a problem becaue if the client has
javascript disabled or doesn't support it you will still get the same "ghost
postbacks" where the source (clicked button) is unknown.

My solution is to do this with an image instead of a button. To do this,
create a <asp:LinkButton > object and set its Text property to be the HTML
for an <img>. You can then use the Click event of the LinkButton object. I
didn't think this would work for quite a while (because when I tested it, it
didn't work). As it turns out, the reason my tests resulted in failure is
because of bug in Internet Explorer...

It turns out that if you have a <form> with less than two text boxes IE
automatically submits the form when the [ENTER] key is pressed. This
happens WHETHER OR NOT you have a submit button in the <form>. If you have
2 OR MORE text boxes, IE will NOT automatically submit the form when [ENTER]
is pressed. Instead, it will CLICK the first button it encounters following
the widget with the focus. This latter behavior is what *should* occur
regardless of the number of text boxes. So... to use my <asp:LinkButton >
solution, you ALSO have to have at least 2 text boxes in the <form>. If
your application only calls for one (or zero), you must supplement the
"missing" text box(es) with hidden text box(es). This could be accomplished
by using CSS to set the visibility to hidden, the width to 0, or both.

Jumping through these hoops will give you the expected behavior. My next
step will be to derive my own "ImageButto n" control (from asp:LinkButton)
that includes the hidden text boxes. It may also accept an alternate
MouseoverImage property to emulate the appearance of an actual button (using
*optional* client-side javascript).

If some jaded soul out there winds up as stuck as I was, I hope this
solution finds them!
Regards,

Eric
"Eric" <ej************ **********@mail blocks.com> wrote in message
news:ex******** ******@TK2MSFTN GP11.phx.gbl...
Hi All,

I'm very experienced in traditional ASP and am new to (am learning) ASP.NET. FYI: I am initially learning ASP.NET with VB.NET to ease the transition for me. I have encountered what I believe to be a huge limitation with ASP.NET and I'm wondering how you have handeled this problem.

Let's suppose you have a page where the user can do one of two things: add a "Category", or add a "Movie Title" to an already existing category. This is just a make-believe scenario that I'm using to make a point: You have two
distinct sections to your page... one section contains a text box and a
button (for adding a new category) and another section contains a dropdown
menu of categories, a text box, and a different button (for adding a new
movie title).

You can have have the Click event of the first button ("bAddCategory" )
handle the addition of the new category, and you can have the Click event of the second button ("bAddMovie" ) add the new movie title. So far, so good.

My problem is this: what if the user presses the [ENTER] key on his/her
keyboard? Doing this does not fire either Click event. I can (in essence) make a "default" button by adding the following to the server-side Load
event for the page:

Page.RegisterHi ddenField("__EV ENTTARGET", bAddMovie.Clien tID)

Doing this will cause the Click event for bAddMovie to fire when the user
presses [ENTER]. However... I don't want bAddMovie to be the default button if the user is in the process of typing a new category name (in that case, I obviously would want bAddCategory to be the default).

In traditional ASP, I would simply have two <form>s on the page. One <form> would encapsulate the widgets for entering a category and a second <form>
would encapsulate the widgets for entering a movie. Each of the two <form> tags would contain a <input type="hidden"> element containing a name/value
pair indicating which form was submitted on postback.

In ASP.NET, I see no way to emulate this concept. ASP.NET does not let me
have two form tags (with runat="server" defined). And, if I use a
client-side (traditional) <form>, I cannot use any of the ASP.NET web
controls (like <asp:DropDownLi st>, etc.). Not being able to use these web
controls, to me, defeats the whole purpose of using ASP.NET. If I revert
back to a traditional <form> tag, I don't get events, viewstates, or any
other fancy ASP.NET features.

This concept (of having two forms) is extremely important to me. What do I do!? Any and all help is very much appreciated!!
Regards,

Eric

Nov 18 '05 #4
IN-LINE COMMENTS:

"Eric" <ej************ **********@mail blocks.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
Well Everyone,

I believe I've stumbled upon an acceptable solution. For the
curious-minded...
That's Me! 0>8-{P

An obvious solution would be to disable the [ENTER] button entirely. Doing
this with javascript however, is a problem becaue if the client has
javascript disabled or doesn't support it you will still get the same "ghost
postbacks" where the source (clicked button) is unknown.
The source (clicked button) is unknown for a very good reason. There is no
button clicked :) It is the default for HTML forms. It does an automatic submit
of the form w/o any buttons being clicked.
My solution is to do this with an image instead of a button. To do this,
create a <asp:LinkButton > object and set its Text property to be the HTML
for an <img>. You can then use the Click event of the LinkButton object. I
didn't think this would work for quite a while (because when I tested it, it
didn't work). As it turns out, the reason my tests resulted in failure is
because of bug in Internet Explorer...

<script language="JavaS cript">
function Element_OnKeyPr ess(e)
{
if (!e) {
e = window.event;

if (!e) {
alert('Could not get the event object!');
}
}

var srcElement = e.srcElement;
// Code to detect which button to simulate clicking.

}
</script>

In the elements that are problematic, add the onkeypress event (Example:

<input type="text" onkeypress="Jav aScript:Element _OnKeyPress(eve nt);">

May want to double check e.srcElement. Can't remember if other browsers support
it or not...

It turns out that if you have a <form> with less than two text boxes IE
automatically submits the form when the [ENTER] key is pressed. This
happens WHETHER OR NOT you have a submit button in the <form>. If you have
2 OR MORE text boxes, IE will NOT automatically submit the form when [ENTER]
is pressed. Instead, it will CLICK the first button it encounters following
the widget with the focus. This latter behavior is what *should* occur
regardless of the number of text boxes. So... to use my <asp:LinkButton >
solution, you ALSO have to have at least 2 text boxes in the <form>. If
your application only calls for one (or zero), you must supplement the
"missing" text box(es) with hidden text box(es). This could be accomplished
by using CSS to set the visibility to hidden, the width to 0, or both.
Hrm, yer right...and I knew this but it didn't come to my mind earlier.
Jumping through these hoops will give you the expected behavior. My next
step will be to derive my own "ImageButto n" control (from asp:LinkButton)
that includes the hidden text boxes. It may also accept an alternate
MouseoverImage property to emulate the appearance of an actual button (using
*optional* client-side javascript).
If some jaded soul out there winds up as stuck as I was, I hope this
solution finds them!
Regards,

Eric

Regards,

Mythran

"Eric" <ej************ **********@mail blocks.com> wrote in message
news:ex******** ******@TK2MSFTN GP11.phx.gbl...
Hi All,

I'm very experienced in traditional ASP and am new to (am learning)

ASP.NET.
FYI: I am initially learning ASP.NET with VB.NET to ease the transition

for
me. I have encountered what I believe to be a huge limitation with

ASP.NET
and I'm wondering how you have handeled this problem.

Let's suppose you have a page where the user can do one of two things: add

a
"Category", or add a "Movie Title" to an already existing category. This

is
just a make-believe scenario that I'm using to make a point: You have two
distinct sections to your page... one section contains a text box and a
button (for adding a new category) and another section contains a dropdown
menu of categories, a text box, and a different button (for adding a new
movie title).

You can have have the Click event of the first button ("bAddCategory" )
handle the addition of the new category, and you can have the Click event

of
the second button ("bAddMovie" ) add the new movie title. So far, so good.

My problem is this: what if the user presses the [ENTER] key on his/her
keyboard? Doing this does not fire either Click event. I can (in

essence)
make a "default" button by adding the following to the server-side Load
event for the page:

Page.RegisterHi ddenField("__EV ENTTARGET", bAddMovie.Clien tID)

Doing this will cause the Click event for bAddMovie to fire when the user
presses [ENTER]. However... I don't want bAddMovie to be the default

button
if the user is in the process of typing a new category name (in that case,

I
obviously would want bAddCategory to be the default).

In traditional ASP, I would simply have two <form>s on the page. One

<form>
would encapsulate the widgets for entering a category and a second <form>
would encapsulate the widgets for entering a movie. Each of the two

<form>
tags would contain a <input type="hidden"> element containing a name/value
pair indicating which form was submitted on postback.

In ASP.NET, I see no way to emulate this concept. ASP.NET does not let me
have two form tags (with runat="server" defined). And, if I use a
client-side (traditional) <form>, I cannot use any of the ASP.NET web
controls (like <asp:DropDownLi st>, etc.). Not being able to use these web
controls, to me, defeats the whole purpose of using ASP.NET. If I revert
back to a traditional <form> tag, I don't get events, viewstates, or any
other fancy ASP.NET features.

This concept (of having two forms) is extremely important to me. What do

I
do!? Any and all help is very much appreciated!!
Regards,

Eric


Nov 18 '05 #5
Thanks! However, scenarios where javascript is disabled/not available on
the client would result in unexpected (rather, annoying and
hard-to-program-for) behavior (events would never get fired). I'd much
rather the page require javascript or simply not function at all.
Furthermore (a more minor thing), my demanding (lazy) nature requires that I
don't have to do a lot of work (like putting a keypress event in every
textbox). How about this:

http://www.ejproductions.com/downloa...magebutton.zip

There's a DLL in there for your /bin directory, a sample ASPX file and a few
images. The ZIP file is a hair over 6K. If you're scared of my DLL (I
don't blame you), I included the ".vb" source file so that anyone can
compile it themselves. I'm pleased with this solution and - woo hoo! - it's
my first ever composite control! ;)

Thanks again Mythran for your interest and assistance!!

Eric
"Mythran" <ki********@hot mail.com> wrote in message
news:OW******** ******@TK2MSFTN GP09.phx.gbl...
IN-LINE COMMENTS:

"Eric" <ej************ **********@mail blocks.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
Well Everyone,

I believe I've stumbled upon an acceptable solution. For the
curious-minded...
That's Me! 0>8-{P

An obvious solution would be to disable the [ENTER] button entirely. Doing this with javascript however, is a problem becaue if the client has
javascript disabled or doesn't support it you will still get the same "ghost postbacks" where the source (clicked button) is unknown.

The source (clicked button) is unknown for a very good reason. There is

no button clicked :) It is the default for HTML forms. It does an automatic submit of the form w/o any buttons being clicked.
My solution is to do this with an image instead of a button. To do this, create a <asp:LinkButton > object and set its Text property to be the HTML for an <img>. You can then use the Click event of the LinkButton object. I didn't think this would work for quite a while (because when I tested it, it didn't work). As it turns out, the reason my tests resulted in failure is because of bug in Internet Explorer...

<script language="JavaS cript">
function Element_OnKeyPr ess(e)
{
if (!e) {
e = window.event;

if (!e) {
alert('Could not get the event object!');
}
}

var srcElement = e.srcElement;
// Code to detect which button to simulate clicking.

}
</script>

In the elements that are problematic, add the onkeypress event (Example:

<input type="text" onkeypress="Jav aScript:Element _OnKeyPress(eve nt);">

May want to double check e.srcElement. Can't remember if other browsers

support it or not...

It turns out that if you have a <form> with less than two text boxes IE
automatically submits the form when the [ENTER] key is pressed. This
happens WHETHER OR NOT you have a submit button in the <form>. If you have 2 OR MORE text boxes, IE will NOT automatically submit the form when [ENTER] is pressed. Instead, it will CLICK the first button it encounters following the widget with the focus. This latter behavior is what *should* occur
regardless of the number of text boxes. So... to use my <asp:LinkButton > solution, you ALSO have to have at least 2 text boxes in the <form>. If
your application only calls for one (or zero), you must supplement the
"missing" text box(es) with hidden text box(es). This could be accomplished by using CSS to set the visibility to hidden, the width to 0, or both.

Hrm, yer right...and I knew this but it didn't come to my mind earlier.
Jumping through these hoops will give you the expected behavior. My next step will be to derive my own "ImageButto n" control (from asp:LinkButton) that includes the hidden text boxes. It may also accept an alternate
MouseoverImage property to emulate the appearance of an actual button (using *optional* client-side javascript).

If some jaded soul out there winds up as stuck as I was, I hope this
solution finds them!
Regards,

Eric


Regards,

Mythran

"Eric" <ej************ **********@mail blocks.com> wrote in message
news:ex******** ******@TK2MSFTN GP11.phx.gbl...
Hi All,

I'm very experienced in traditional ASP and am new to (am learning)

ASP.NET.
FYI: I am initially learning ASP.NET with VB.NET to ease the transition
for
me. I have encountered what I believe to be a huge limitation with

ASP.NET
and I'm wondering how you have handeled this problem.

Let's suppose you have a page where the user can do one of two things:
add a
"Category", or add a "Movie Title" to an already existing category.
This is
just a make-believe scenario that I'm using to make a point: You have
two distinct sections to your page... one section contains a text box and a button (for adding a new category) and another section contains a dropdown menu of categories, a text box, and a different button (for adding a new movie title).

You can have have the Click event of the first button ("bAddCategory" )
handle the addition of the new category, and you can have the Click event of
the second button ("bAddMovie" ) add the new movie title. So far, so
good.
My problem is this: what if the user presses the [ENTER] key on his/her keyboard? Doing this does not fire either Click event. I can (in

essence)
make a "default" button by adding the following to the server-side Load event for the page:

Page.RegisterHi ddenField("__EV ENTTARGET", bAddMovie.Clien tID)

Doing this will cause the Click event for bAddMovie to fire when the user presses [ENTER]. However... I don't want bAddMovie to be the default

button
if the user is in the process of typing a new category name (in that case, I
obviously would want bAddCategory to be the default).

In traditional ASP, I would simply have two <form>s on the page. One

<form>
would encapsulate the widgets for entering a category and a second
<form> would encapsulate the widgets for entering a movie. Each of the two

<form>
tags would contain a <input type="hidden"> element containing a name/value pair indicating which form was submitted on postback.

In ASP.NET, I see no way to emulate this concept. ASP.NET does not let me have two form tags (with runat="server" defined). And, if I use a
client-side (traditional) <form>, I cannot use any of the ASP.NET web
controls (like <asp:DropDownLi st>, etc.). Not being able to use these web controls, to me, defeats the whole purpose of using ASP.NET. If I revert back to a traditional <form> tag, I don't get events, viewstates, or any other fancy ASP.NET features.

This concept (of having two forms) is extremely important to me. What

do I
do!? Any and all help is very much appreciated!!
Regards,

Eric



Nov 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3726
by: gwaddell | last post by:
I have an Access XP ADE application connected to a SQL Server 7.0 SP4 database. I have created a timestamp column in the main table. Unfortunately, I am now getting persistent write conflict errors. The order of operations are: 1. The application starts and loads the recordset into the form using a stored procedure. 2. I modify a field and press a save button which uses me.dirty=false to force a save. 3. The field is saved to the...
0
3516
by: Krisa | last post by:
Hello all, I just discovered something (stop me if you've heard this before....) that was causing me a significant performance hit when opening a form with subforms. To speed up loading the form, I set the rowsources of its, and its subforms', combo boxes in the "Enter" events of the combo boxes. That's the standard trick for not loading the rowsource unless/until the user actually needs the combo box. For example:
10
2398
by: BBFrost | last post by:
We just recently moved one of our major c# apps from VS Net 2002 to VS Net 2003. At first things were looking ok, now problems are starting to appear. So far ... (1) ComboBox.SelectedValue = db_value; If the db_value was not included in the ComboBox value list the ComboBox.SelectedIndex used to return -1, Now the very same code is
1
3082
by: Matthew Wieder | last post by:
Hi - I wanted to capture the enter button on a form since I have a datagrid with the first column being a delete button and if someone hits enter it deletes the first record. I coded: private void Page_Load(object sender, System.EventArgs e) { Page.RegisterHiddenField("__EVENTTARGET","SomeButtonOnThePage");
2
7179
by: Cindy | last post by:
Hi all you smarties out there, I'm having a little conundrum with my asp.net page Scenario: I have a form (asp.net) with no code behind (as yet). I have placed a javascript function on a server side textbox control to do something - eg change the words on label - when the key pressed is the "enter" key. I can see the label change to what i expect ----- BUT .... then the
2
10353
by: Gill Smith | last post by:
In my ASP.Net application when the user hit the enter key and the focus is on the edit box causing the page to postback. How to avoid this ? -Gish
4
2755
by: Frank Reichenbacher | last post by:
In MS Access VB, which I have been using for several years, the default enter key behavior in a textbox is identical to the tab key. Data are read and the focus moves to the next control in the tab order. In VB.NET the default behavior is that data are read, but the focus does not change. I find this to be extremely bad form management. Users (including me) are universally accustomed to using the enter key to move from one field to the...
8
5083
by: =?Utf-8?B?TGlzYUNvbnN1bHQ=?= | last post by:
I have a data entry application. Due to ease and location, the users utilizie the enter key to move from field to field, rather than the tab key. Depending on the data they enter into a field, they may skip fields in the "tab order" so I do not simply use process tab key. Application works fine except for an oddity. There is a button on the form. If the user hits enter to arrive on the button, then swaps (via MDI) to another form,...
5
2746
by: =?Utf-8?B?SnVsaWEgQg==?= | last post by:
Hi all I've got a very complex form with loads of text boxes and buttons on it. It's causing me all sorts of problems when users press the enter key and cause a postback. I need to disable the enter key. I've done some surfing and found some Microsoft recommended code but it doesn't seem to work and I'm wondering what I've done wrong. If possible I'd like to disable the enter key for the whole form not for each text box (that would be...
0
8016
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7955
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8440
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8306
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6773
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5966
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5466
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3980
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1300
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.