Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / DataGrid / January 2005

Tip: Looking for answers? Try searching our database.

Refresh problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sunny - 31 Jan 2005 02:08 GMT
I use javascript to modify the label. when I refresh the web page. I lost
the modification. How can I put it into ViewState or How can I know whether
it is a refresh or regular postback in code behind?

any idea?

Thanks

Sunny.
Eliyahu Goldin - 31 Jan 2005 09:43 GMT
Sunny,

If you modify the html presentation of an asp.net Label control, you need to
communicate the change to the server. You can use an <input type = "hidden">
for this. On server side you get the value from the hidden input and set the
label.

What does it have to do with differentiation between a refresh or regular
postback in code behind? It's another question. Browser refresh button
always repeats the last postback. On server side you can tell the difference
if you include a unique piece of data in the postback, for example a
timestamp. On the server you compare the timestamp that just came with the
one from the previous postback. If it's the same, it must be a refresh and
not an another postback.

Eliyahu

> I use javascript to modify the label. when I refresh the web page. I lost
> the modification. How can I put it into ViewState or How can I know whether
[quoted text clipped - 5 lines]
>
> Sunny.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.