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

Discussion in 'ASP .Net' started by Richard, May 11, 2006.

  1. Richard

    Richard Guest

    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
    Richard, May 11, 2006
    #1
    1. Advertising

  2. 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!
    --
    Nathan Sokalski

    http://www.nathansokalski.com/

    "Richard" <> wrote in message
    news:...
    > 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
    >
    Nathan Sokalski, May 12, 2006
    #2
    1. Advertising

  3. Richard

    Richard Guest

    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

    Nathan Sokalski wrote:
    > 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!
    > --
    > Nathan Sokalski
    >
    > http://www.nathansokalski.com/
    >
    > "Richard" <> wrote in message
    > news:...
    > > 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
    > >
    Richard, May 12, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lloyd Sheen

    Mixing Server and Client Code

    Lloyd Sheen, Nov 18, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    359
    Dales
    Nov 18, 2003
  2. Shawn Repphan

    Mixing server and client controls

    Shawn Repphan, Jan 18, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    451
    =?Utf-8?B?U2VyZ2V5IFBvYmVyZXpvdnNraXk=?=
    Jan 20, 2006
  3. Simon Brooke
    Replies:
    1
    Views:
    970
    Martin Honnen
    Apr 3, 2007
  4. Replies:
    0
    Views:
    170
  5. Replies:
    1
    Views:
    114
Loading...

Share This Page