raising events without a postback ??? Is it possible?


Hi experts. Here's the situation. I have created a web user control that contains a series of text boxes among other things (that don't apply to this question). Another web page is using this control. That page might need to do some business rule specific stuff when the focus of a text box in the web control changes. Is it possible to:

1) Fire a method within the control when the focus on the text box changes without making a post back?

2) If #1 can't be done then this can't either....but anyhow.....Could the control raise an event to the containing web page that a text box has lost focus without making a postback?

Any ideas would be appreciated.
jbaisdenAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Carl TawnSystems and Integration DeveloperCommented:
If you are working with .Net 2.0 then the new client-side callback mechanism might work for you. You can see an example here:

    http://www.dotnetjunkies.com/Tutorial/E80EC96F-1C32-4855-85AE-9E30EECF13D7.dcik   

And here:

    http://bitarray.co.uk/ben/articles/234.aspx
jbaisdenAuthor Commented:


Hmm....its .Net 1.4 framework
Carl TawnSystems and Integration DeveloperCommented:
In that case I don't think its possible. You can switch the AutoPostBack off for the textbox which will simply cache the event until the next postback occurs, but if the event needs to be handled by the server then you have no choice but to postback.
Exploring ASP.NET Core: Fundamentals

Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and  exploring the core foundations for app libraries.

jbaisdenAuthor Commented:

Okay is #1 possible?
Carl TawnSystems and Integration DeveloperCommented:
No, because the methods of the web control are only available at the server. What's sent to the browser is just the HTML representation of the control, not any of its methods, so the only way to access them is at the server end.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jbaisdenAuthor Commented:

Well, I guess that wraps this up. Thanks for your help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.