Qus:    Suppose we need a certain ASP.NET function to be executed on mouse-over over a certain button or textbox. Where do we add an event?
Nov 30, 2020 13:36 2 Answers Views: 88 SWEETY

 



 Each web control has an ability to add the attributes on client side that will execute on client side and run a client-side script like a JavaScript function.

Ex – btnSubmit.Attributes.Add (“onMouseOver”,”someClientCode();”)

TextBox.Attributes.Add(“onFocus”,”ClearText();”)

Prev Next
Answers (2)
PARTH Dec 01, 2020 08:05
Answer:   You can add an OnMouseOver attribute to the button.

For Example -

btnSubmit.Attributes.Add(”onmouseover”,”yourClientCodeComesHere”);

SAI Dec 01, 2020 09:09
Answer:   Each web control has an ability to add the attributes on client side that will execute on client side and run a client-side script like a JavaScript function.
Ex – btnSubmit.Attributes.Add (“onMouseOver”,”someClientCode();”)
TextBox.Attributes.Add(“onFocus”,”ClearText();”)

Post Your Answer
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.


Let`s Connect