Login  
Search All Forums
Dart Home | PowerWEB LiveControls for ASP.NET | Custom Development Reply | PowerWEB LiveControls for ASP.NET Topics | Forums   
AuthorForum: PowerWEB LiveControls for ASP.NET
Topic: Default LiveButton
mikewheat
mikewheat@tm.net

From: Davison, MI USA
Posts: 26
Member Since: 05/16/05
posted July 15, 2008 1:36 PM

Hi,

Is there a way to set a LiveButton as the default button for a form so when a user presses enter it will fire the click event?

Thank you,
Mike
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted July 15, 2008 5:27 PM

Hi Mike,
Not really; the <Enter> will affect whatever control has the focus.

That being said, you might be able to finagle something together that caused the button to constantly get Focus (for example, set it in the Page Load).
How well that works would depend on what else was on the page.

-ken

------
-Non-current subscribers must contact sales@dart.com to update subscription and receive continued support as needed.
------

mikewheat
mikewheat@tm.net

From: Davison, MI USA
Posts: 26
Member Since: 05/16/05
posted July 15, 2008 6:03 PM

Ken,

I have a LiveTextBox and a LiveButton on a page. I have figured out how to capture the enter key being pressed by using the textbox's keypress event.

I tried to set the WaitMessage and WaitElementID in order to display a message the user. This works if the user presses the button.

Maybe I can dynamically click the enter button in the keypress event of the textbox. Is this possible?

Thank you,
Mike
mikewheat
mikewheat@tm.net

From: Davison, MI USA
Posts: 26
Member Since: 05/16/05
posted July 16, 2008 10:04 AM

Ken,

I am looking for a way to programmatically fire the click event of a LiveButton and display the wait message during the callback.

The wait message is displayed when the button is clicked by the user but not when I call the click event in code.

btnSearch_Click(btnClick, New EventArgs())

Any ideas on what I am doing wrong?

Thank you,
Mike

K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted July 17, 2008 5:28 PM

Hi Mike,
I'm not sure I follow exactly what you want to do, but this might work for you.

Replace the line where you are executing the event handler code with the code below.
LiveLabel1 is the WaitElementId in this example.

btnSearch.BufferedScript.Write("pwBeginCallback('btnSearch', 'Click','100@100', 'pwInternalCallback', '', false, 'LiveLabel1','Processing...',PW_DISABLEAUTOBEHAVIOR,'',true);");

Hope it helps,
-ken

------
-Non-current subscribers must contact sales@dart.com to update subscription and receive continued support as needed.
------

mikewheat
mikewheat@tm.net

From: Davison, MI USA
Posts: 26
Member Since: 05/16/05
posted July 18, 2008 1:03 PM

Ken,

That was exactly what I needed.

I just needed to know what to do to make the enter key in the keypress event have the same exact behavior as the click event of the button.

Thank you,
Mike
Reply | PowerWEB LiveControls for ASP.NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX