Mixing client-side and server-side processing: How?

R

Richard

Hi All,

I just picked up an ASP.NET "Mortgage Calculator" example with
code-behind from Prosise's 2002 "Programming Microsoft.NET". Works
great. User enters a few values, clicks button, and monthy payment is
displayed.

When I design apps like this, I like to clear out result fields like
"monthly payment" the minute the user changes any of the parameters of
the mortgage. Doing that server-side looks easy enough, but I'd want
to do it client-side in a real, business app.

So how can I add trapping of onchange events to the asp fields for
client-side processing?

Regards,
Richard
 
N

Nathan Sokalski

The easiest way would be to generate client-side JavaScript and add it using
the RegisterClientScriptBlock() method and the Attributes.Add() method. I
can't really tell you exactly what the code should look like since I haven't
seen your current code, but if you have ever used JavaScript before it
shouldn't be hard to figure out. Good Luck!
 
R

Richard

Hi Nathan,

Thanks a lot. I agree: I should be able to figure it out, which I'll
try to do this weekend.

Best wishes,
Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,737
Latest member
Georgeengab

Latest Threads

Top