Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 519923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:05:29+00:00 2026-05-13T08:05:29+00:00

I have an asp:ListView control which list playlists. It has paging supported and holds

  • 0

I have an asp:ListView control which list playlists. It has paging supported and holds 10 playlists per page. Currently, when the user clicks a view link under a playlist, it redirects them to another page where they can view the songs in the playlist. If they want to edit the songs in the playlist, they can click an edit link and it will redirect them back to the the page with the playlists and it will display a panel with the songs in the list they can add and remove. This works fine if the item they are editing is on the first page, but if the item is not on the first page, the item that gets market for editing is the first item on the first page, so I guess my question is, how do I get to the page of the ListView that the item is on. Currently in my Page Load, I have the following:

if (!Page.IsPostBack)
{
    LoadPlaylists();

    if(Request.QueryString["edit"] != null)
    {
        ListViewEditEventArgs args = new 
        ListViewEditEventArgs(FindEditItemIndex(Request.QueryString["edit"]));

        lvwPortfolios_RowEditing(this.lvwPlaylists, args);
    }
 }

I am using a DataPager control to handle the paging.

This is where it gets it query string from:

protected void lnkEditPlaylist_Click(object sender, EventArgs e)
{
    Response.Redirect("~/playlist/playlist.aspx?edit=" + lblPlaylistName.Text.Trim());
}

Interesting thing to note is that I believe it puts the correct item in edit mode, but it does not jump to the correct page, it stays on the first page of the listview, so it looks like it is an issue with the datapager control. Is it just as simple as programmatically jumping to the correct page?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T08:05:29+00:00Added an answer on May 13, 2026 at 8:05 am

    Did you try changing your page load to this:

    if (!Page.IsPostBack)
    {
        LoadPlaylists();
    }
    
    if(Request.QueryString["edit"] != null)
    {
        ListViewEditEventArgs args = new 
        ListViewEditEventArgs(FindEditItemIndex(Request.QueryString["edit"]));
    
        lvwPortfolios_RowEditing(this.lvwPlaylists, args);
    }
    

    Here you take the editing out of the check for a post back. I feel like this could be your problem because editing is only allowed when the page is first loaded the way you have it now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an asp:ListView control on an ASP.NET page. It is bound to an
I have a asp:ListView control that I bind with a List<CustomObject> . When Editing
The ASP.NET ListView control like most databound ASP.NET controls has an AlternatingItemTemplate which you
I have a ListView control which I used to populate using an ASP ObjectDataSource
I have a ListView control in Asp.Net WebForms which display a set of elements,
I have trouble getting a custom ObjectDataSource for an asp:ListView control to work. I
I have an ASP.NET 2.0 ListView control (aka:parent) and configured inside this ListView I
I have an ASP.Net site, in which I am using a ListView with a
I have ListView that has the following EditItemTemplate: <EditItemTemplate> <tr style=> <td> <asp:LinkButton ID=UpdateButton
I have an ASP.NET ListView control (see below). Unfortunately, when a ListView control is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.