Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Page Refreshing Incorrectly

Reply
Thread Tools

Page Refreshing Incorrectly

 
 
LisaMark0822
Guest
Posts: n/a
 
      12-20-2004
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

 
Reply With Quote
 
 
 
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      12-20-2004
It's hard to say without seeing the code that you're using to pull in the
records.

Ray at work

"LisaMark0822" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
 
 
 
Patrice
Guest
Posts: n/a
 
      12-20-2004
How do you know which record is "current" ?

Patrice

--

"LisaMark0822" <(E-Mail Removed)> a écrit dans le
message de news:(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
LisaMark0822
Guest
Posts: n/a
 
      12-21-2004
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
>

 
Reply With Quote
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      12-21-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
> >



 
Reply With Quote
 
Dave Anderson
Guest
Posts: n/a
 
      12-24-2004
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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Page.ClientScript.RegisterClientScriptBlock renders incorrectly Scott M. ASP .Net 2 09-09-2008 03:46 PM
Refreshing page 1 after page 2 has been called from page 1 patrice.fiset@gmail.com Javascript 2 06-20-2007 10:13 PM
Self-refreshing and non-self-refreshing controls Harlan Messinger ASP .Net 1 08-04-2006 01:13 PM
Self-refreshing and non-self-refreshing controls Harlan Messinger ASP .Net Web Controls 0 08-03-2006 12:29 PM
refreshing control data on a page, without the entire page re-loading Milsnips ASP .Net 1 05-16-2005 10:35 AM



Advertisments