Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Lostfocus event in textbox

Reply
Thread Tools

Lostfocus event in textbox

 
 
Annie
Guest
Posts: n/a
 
      05-24-2006
hello guys,

I am using asp.net 2 and I only can see it has got a textchanged event.

How can i implemnet the lostfocus event for a text in asp.net?
Any examples will be appreciated

thanks


 
Reply With Quote
 
 
 
 
recoil@community.nospam
Guest
Posts: n/a
 
      05-24-2006
Hello Annie.
If you wish to implement client-side javascript for this event then you
would need to use
txtDummy.Attributes.Add("onblur", "alert('losing focus');");

Hopefully you don't want to post back to the server whenever the user loses
focus. It is extremely annoying, and server resource consuming.

Hope this helps.
"Annie" wrote:

> hello guys,
>
> I am using asp.net 2 and I only can see it has got a textchanged event.
>
> How can i implemnet the lostfocus event for a text in asp.net?
> Any examples will be appreciated
>
> thanks
>
>
>

 
Reply With Quote
 
 
 
 
Annie
Guest
Posts: n/a
 
      05-25-2006
Thanks for your reply,

However, I was hoping to be able to do something in the server side actually
....
Because it requires some business rules and then need to do some
calculations based
on the value of two textboxes and then fill another textbox.

I didn't want to do all these in javascript ... ;(

Any other ways around this?

many thanks

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello Annie.
> If you wish to implement client-side javascript for this event then you
> would need to use
> txtDummy.Attributes.Add("onblur", "alert('losing focus');");
>
> Hopefully you don't want to post back to the server whenever the user
> loses
> focus. It is extremely annoying, and server resource consuming.
>
> Hope this helps.
> "Annie" wrote:
>
>> hello guys,
>>
>> I am using asp.net 2 and I only can see it has got a textchanged event.
>>
>> How can i implemnet the lostfocus event for a text in asp.net?
>> Any examples will be appreciated
>>
>> thanks
>>
>>
>>



 
Reply With Quote
 
mnichols
Guest
Posts: n/a
 
      05-25-2006
The suggestion given could still work for you just modify as follows:

txtDummy.Attributes.Add("onblur", "form1.submit();");

At the same time most users would be surprised by this behaviour. Is
there anyway to redesign your form with a 'submit' or 'evaluate' button
instead?

mn

Annie wrote:
> Thanks for your reply,
>
> However, I was hoping to be able to do something in the server side actually
> ...
> Because it requires some business rules and then need to do some
> calculations based
> on the value of two textboxes and then fill another textbox.
>
> I didn't want to do all these in javascript ... ;(
>
> Any other ways around this?
>
> many thanks
>
> <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Hello Annie.
>> If you wish to implement client-side javascript for this event then you
>> would need to use
>> txtDummy.Attributes.Add("onblur", "alert('losing focus');");
>>
>> Hopefully you don't want to post back to the server whenever the user
>> loses
>> focus. It is extremely annoying, and server resource consuming.
>>
>> Hope this helps.
>> "Annie" wrote:
>>
>>> hello guys,
>>>
>>> I am using asp.net 2 and I only can see it has got a textchanged event.
>>>
>>> How can i implemnet the lostfocus event for a text in asp.net?
>>> Any examples will be appreciated
>>>
>>> thanks
>>>
>>>
>>>

>
>

 
Reply With Quote
 
Annie
Guest
Posts: n/a
 
      05-27-2006
Thanks for youre reply,
i think this is one of the alternatives ... and you are right the design
needs some changes ... coz this makes things very slow
many thanks

"mnichols" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> The suggestion given could still work for you just modify as follows:
>
> txtDummy.Attributes.Add("onblur", "form1.submit();");
>
> At the same time most users would be surprised by this behaviour. Is there
> anyway to redesign your form with a 'submit' or 'evaluate' button instead?
>
> mn
>
> Annie wrote:
>> Thanks for your reply,
>>
>> However, I was hoping to be able to do something in the server side
>> actually ...
>> Because it requires some business rules and then need to do some
>> calculations based
>> on the value of two textboxes and then fill another textbox.
>>
>> I didn't want to do all these in javascript ... ;(
>>
>> Any other ways around this?
>>
>> many thanks
>>
>> <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> Hello Annie.
>>> If you wish to implement client-side javascript for this event then you
>>> would need to use
>>> txtDummy.Attributes.Add("onblur", "alert('losing focus');");
>>>
>>> Hopefully you don't want to post back to the server whenever the user
>>> loses
>>> focus. It is extremely annoying, and server resource consuming.
>>>
>>> Hope this helps.
>>> "Annie" wrote:
>>>
>>>> hello guys,
>>>>
>>>> I am using asp.net 2 and I only can see it has got a textchanged event.
>>>>
>>>> How can i implemnet the lostfocus event for a text in asp.net?
>>>> Any examples will be appreciated
>>>>
>>>> thanks
>>>>
>>>>
>>>>

>>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why is a button Click event also called when a textbox TextChanged event is called??? S_K ASP .Net 6 11-08-2007 07:44 PM
TextBox lostfocus event blighty ASP .Net Mobile 0 08-18-2004 03:11 AM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net 2 05-25-2004 11:45 PM
LostFocus Event Pratap ASP .Net 2 12-30-2003 02:46 PM
LostFocus GotFocus Events Pratap ASP .Net Web Controls 1 12-30-2003 10:29 AM



Advertisments