Results 1 to 2 of 2

Thread: [RESOLVED] multiview, prevent page reload

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2012
    Posts
    27

    Resolved [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.

  2. #2

    Thread Starter
    Junior Member
    Join Date
    Jan 2012
    Posts
    27

    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
  •  



Click Here to Expand Forum to Full Width