Formatting numbers and page reload

Discussion in 'ASP .Net' started by Morten Snedker, Nov 30, 2006.

  1. The following code works well:

    If Not Double.Parse(Me.txtTilslutning.Text) Then
    Me.txtTilslutning.ForeColor = Drawing.Color.Red
    Else
    Me.txtTilslutning.ForeColor = Drawing.Color.Black
    End If

    The only problem is, that it reloads the page, in which I'm not
    interested.

    Which is the proper way to do this without reloading the page, but
    still show the changes client-side?

    Regards /Snedker
     
    Morten Snedker, Nov 30, 2006
    #1
    1. Advertising

  2. Morten Snedker

    Mark Rae Guest

    "Morten Snedker" <morten_spammenot_ATdbconsult.dk> wrote in message
    news:...

    > If Not Double.Parse(Me.txtTilslutning.Text) Then
    > Me.txtTilslutning.ForeColor = Drawing.Color.Red
    > Else
    > Me.txtTilslutning.ForeColor = Drawing.Color.Black
    > End If
    >
    > The only problem is, that it reloads the page, in which I'm not
    > interested.


    Why does it reload the page? In which method does this code reside?

    > Which is the proper way to do this without reloading the page, but
    > still show the changes client-side?


    If you want dynamic content which doesn't reload the page, you (more or
    less) have two choices:

    1) client-side JavaScript

    2) Ajax
     
    Mark Rae, Nov 30, 2006
    #2
    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. =?Utf-8?B?U3ltcGhvbnk=?=

    scoll down a page to a certain position when reload the page

    =?Utf-8?B?U3ltcGhvbnk=?=, Mar 3, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    585
    Craig Deelsnyder
    Mar 3, 2005
  2. Joshua Beall
    Replies:
    26
    Views:
    222,723
    AndreiKaa
    Jun 29, 2007
  3. gen_tricomi
    Replies:
    2
    Views:
    787
    gen_tricomi
    May 23, 2006
  4. Andrew Tatum

    Fibonacci Numbers and Lucas Numbers

    Andrew Tatum, May 26, 2007, in forum: C++
    Replies:
    6
    Views:
    593
    Howard
    May 27, 2007
  5. Stefan Mueller
    Replies:
    4
    Views:
    321
    Stefan Mueller
    Nov 5, 2005
Loading...

Share This Page