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 9247243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:40:47+00:00 2026-06-18T09:40:47+00:00

I’ve got a repeater which is bound to a List<> generated from an XML

  • 0

I’ve got a repeater which is bound to a List<> generated from an XML file. The file consists of two nodes, ID and Item.

<Items><ID>0</ID>
<Item><![CDATA[<a target='blank' href="http://www.cnn.com">CNN News</a> ]]></Item>

I need to provide Edit functionality to allow a user to edit the url and the text of each item in the repeater. I don’t want separate Edit/Save buttons for each row; too much clutter. I guess that means a single Edit/Save button, which would essentially result in the XML file being “created” anew on each Save. Or, might there be a better way to do this?

I guess I’m asking two things:

  1. A design suggestion on how to make a list of URLs editable (both url and text). Two separate text boxes I guess?

  2. How to handle edits.

Thanks.

  • 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-06-18T09:40:49+00:00Added an answer on June 18, 2026 at 9:40 am
    1. Yes, two separate fields is the way to go here
    2. As far as editing, you can have two panels for your ItemTemplate. One for View and one for Edit. The Edit panel’s visibility is set to false by default. Each row has an “Edit” button with the item’s ID as its CommandArgument, that when pressed, you set a Session variable with the ID of the item clicked. Then when you rebind your repeater, you check each item’s ID against the Session edit ID variable. If they match, you set the View panel’s visibility to false and the Edit panel’s visibility to true. The Edit panel has two buttons, one for Save and one for Cancel. Once the user clicks Save or Edit, you do any back-end processing, clear the Session variable and rebind the repeater. Although there are built in controls that have edit functionality “built-in”, I find the control I am alloted by using the Repeater is superior.

    I’ve used this method numerous times and it works great!

    If you need any code to illustrate any of the point above, feel free to ask.

    As a side not, your XML looks a little strange. There doesn’t seem to be a parent node to represent each URL/ID pair. It this an oversight, a typo, or am I missing something here?

    EDIT:

    This is a good way to utilize ViewState in your scenario:

        private enum PageStates
        {
            None = 0,
            View = 1,
            Edit = 2
        }
    
        /// <summary>
        /// The current state of the page
        /// </summary>
        private PageStates PageState
        {
            get
            {
                if (ViewState["PageState"] == null)
                    ViewState["PageState"] = PageStates.View; //default to view state
    
                return (PageStates)ViewState["PageState"];
            }
            set
            {
                ViewState["PageState"] = value;
            }
        }
    

    By encapsulating ViewState access in a property, any changes to the method of storing the variable (Session, DB, etc) are abstracted away from any code that accesses it.

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

Sidebar

Related Questions

In my XML file chapters tag has more chapter tag.i need to display chapters
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I have a text area in my form which accepts all possible characters from
I'm parsing an XML file, the creators of it stuck in a bunch social
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small

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.