Page Refreshing Incorrectly

Discussion in 'ASP General' started by LisaMark0822, Dec 20, 2004.

  1. LisaMark0822

    LisaMark0822 Guest

    I have an asp page that gets populated from a SQL Server database. Normally
    when the page gets displayed it displays the current record from a select
    statement that can return lets say seven records.

    The problem I am having is when I click the refresh button in IE, the page
    displays another record instead of the record it was displaying before I
    clicked on the refresh button.

    I cannot figure out why it is doing this. Has anyone experienced a similar
    problem? If so, what solution did you come up with.

    Thanks

    Mark
     
    LisaMark0822, Dec 20, 2004
    #1
    1. Advertising

  2. It's hard to say without seeing the code that you're using to pull in the
    records.

    Ray at work

    "LisaMark0822" <> wrote in message
    news:...
    > I have an asp page that gets populated from a SQL Server database.

    Normally
    > when the page gets displayed it displays the current record from a select
    > statement that can return lets say seven records.
    >
    > The problem I am having is when I click the refresh button in IE, the page
    > displays another record instead of the record it was displaying before I
    > clicked on the refresh button.
    >
    > I cannot figure out why it is doing this. Has anyone experienced a similar
    > problem? If so, what solution did you come up with.
    >
    > Thanks
    >
    > Mark
    >
     
    Ray Costanzo [MVP], Dec 20, 2004
    #2
    1. Advertising

  3. LisaMark0822

    Patrice Guest

    How do you know which record is "current" ?

    Patrice

    --

    "LisaMark0822" <> a écrit dans le
    message de news:...
    > I have an asp page that gets populated from a SQL Server database.

    Normally
    > when the page gets displayed it displays the current record from a select
    > statement that can return lets say seven records.
    >
    > The problem I am having is when I click the refresh button in IE, the page
    > displays another record instead of the record it was displaying before I
    > clicked on the refresh button.
    >
    > I cannot figure out why it is doing this. Has anyone experienced a similar
    > problem? If so, what solution did you come up with.
    >
    > Thanks
    >
    > Mark
    >
     
    Patrice, Dec 20, 2004
    #3
  4. LisaMark0822

    LisaMark0822 Guest

    What I have is on the prior page I display all the records returned from the
    select statement, lets say 7. The user clicks on the record he wants (record
    3 of 7) and it takes you to another page that displays the information from
    the select statement. However, when I click the refresh button on the asp
    page, when the page gets refreshed, it displays record 4, or 5 or 2 not the
    current record that was displayed prior to the user clicking on the refresh
    button. I hope that helps.

    Thanks,

    Mark



    "LisaMark0822" wrote:

    > I have an asp page that gets populated from a SQL Server database. Normally
    > when the page gets displayed it displays the current record from a select
    > statement that can return lets say seven records.
    >
    > The problem I am having is when I click the refresh button in IE, the page
    > displays another record instead of the record it was displaying before I
    > clicked on the refresh button.
    >
    > I cannot figure out why it is doing this. Has anyone experienced a similar
    > problem? If so, what solution did you come up with.
    >
    > Thanks
    >
    > Mark
    >
     
    LisaMark0822, Dec 21, 2004
    #4
  5. We still don't know how your page is determining what record to pull in. Is
    there something in the querystring?

    <% iRecordIDToDisplay = Request.Querystring("id") %>

    Or something like that?

    Is this page in frames, by chance?

    Ray at work

    "LisaMark0822" <> wrote in message
    news:...
    > What I have is on the prior page I display all the records returned from

    the
    > select statement, lets say 7. The user clicks on the record he wants

    (record
    > 3 of 7) and it takes you to another page that displays the information

    from
    > the select statement. However, when I click the refresh button on the asp
    > page, when the page gets refreshed, it displays record 4, or 5 or 2 not

    the
    > current record that was displayed prior to the user clicking on the

    refresh
    > button. I hope that helps.
    >
    > Thanks,
    >
    > Mark
    >
    >
    >
    > "LisaMark0822" wrote:
    >
    > > I have an asp page that gets populated from a SQL Server database.

    Normally
    > > when the page gets displayed it displays the current record from a

    select
    > > statement that can return lets say seven records.
    > >
    > > The problem I am having is when I click the refresh button in IE, the

    page
    > > displays another record instead of the record it was displaying before I
    > > clicked on the refresh button.
    > >
    > > I cannot figure out why it is doing this. Has anyone experienced a

    similar
    > > problem? If so, what solution did you come up with.
    > >
    > > Thanks
    > >
    > > Mark
    > >
     
    Ray Costanzo [MVP], Dec 21, 2004
    #5
  6. LisaMark0822 wrote:
    > What I have is on the prior page I display all the records returned
    > from the select statement, lets say 7. The user clicks on the record
    > he wants (record 3 of 7) and it takes you to another page that
    > displays the information from the select statement. However, when I
    > click the refresh button on the asp page, when the page gets
    > refreshed, it displays record 4, or 5 or 2 not the current record
    > that was displayed prior to the user clicking on the refresh button.


    Are you using an ORDER BY clause in your SELECT statement? More to the
    point, are you ordering on a column that actually differentiates between
    records?

    Either way, it would be better to use an identity or primary key value for
    identifying the record to display, since the Nth record of any SELECT
    changes as the data changes.



    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms. Please do not contact
    me directly or ask me to contact you directly for assistance. If your
    question is worth asking, it's worth posting.
     
    Dave Anderson, Dec 24, 2004
    #6
    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. Galina Grechka
    Replies:
    3
    Views:
    346
    Galina Grechka
    Jan 19, 2005
  2. Harlan Messinger

    Self-refreshing and non-self-refreshing controls

    Harlan Messinger, Aug 4, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    465
    =?Utf-8?B?Y2xpY2tvbg==?=
    Aug 4, 2006
  3. Scott M.
    Replies:
    2
    Views:
    1,370
    bruce barker
    Sep 9, 2008
  4. Harlan Messinger

    Self-refreshing and non-self-refreshing controls

    Harlan Messinger, Aug 3, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    190
    Harlan Messinger
    Aug 3, 2006
  5. Replies:
    2
    Views:
    134
Loading...

Share This Page