"Lost Focus" event on web form text box

Hi

Is is possible to handle a "lost focus" event on a web form text box in c#?
EugeneCAsked:
Who is Participating?
 
SwapnilSoftware ArchitectCommented:
Hi SmithJW,

you can do it by following way.

<script language="javascript">
function LFocus()
{
    alert("test");
}
</script>

<asp:textbox id="txttest" onblur ="javascript:LFocus()"></asp:textbox>


Regards,
NetSwap
0
 
SmithJWCommented:
apologies... that tutorial is for regular forms.
It is possible however, but i read that you have to capture the exitFocus event of the input box... I will try and track down the page again.
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
EugeneCAuthor Commented:
Thank you for that but is there anyway I can hook up the Javascript so I can handle code behind functions.
0
 
EugeneCAuthor Commented:
Ideally I need to capture the "loose focus" event so that it runs a c# code behind function.
0
 
EugeneCAuthor Commented:
Could anyone suggest an alternative approach - I need to capture the "loose focus" event on a c# web form
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.