|
-
Aug 20th, 2012, 06:01 AM
#1
Thread Starter
Junior Member
[RESOLVED] multiview, prevent page reload
Hi all,
I've written some code to scan a directory and write the images to a different view. I'm using buttons with CommandName="NextView" and CommandName="PrevView" to navigate to the following view.
My code to write the images to the different views is called upon the page_load event.
However after clicking the next and previous button this seems to cause a page reload as the images are written to the view again so I end up with duplicate images.
I googled a bit and one of the suggestions was to place the multiview in an contenttemplate and updatepanel but that didn't work either.
Now I've solved the problem by clearing the labels to which the images are written in the page load before the other code fires.
But I'm curious if there is a 'proper' way to solve this.
-
Aug 24th, 2012, 09:30 AM
#2
Thread Starter
Junior Member
Re: multiview, prevent page reload
Solved by using:
Code:
If Not IsPostBack Then
code to execute
End If
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|