cant delete item from specialized collection stored in a profile?

Last post 09-18-2008 5:31 AM by amereto2k. 0 replies.

Sort Posts:

  • cant delete item from specialized collection stored in a profile?

    09-18-2008, 5:31 AM
    • Member
      237 point Member
    • amereto2k
    • Member since 01-30-2006, 11:31 AM
    • Posts 386

    Hi,

     On my profiles.aspx page I have a simple listbox which users can add URL links to

    and see them next time they visit the page. this is done by typing in a link to a

    textbox and then clicking the add button which saves the urls

    as a collection and stores it in the profile declared in we config."FavoriteURLs .

     What I cant work out is how to delete an item in the list. If I dont logg on it works

    but if I logg it does not. below is the method for adding a URL

     

    protected void AddURL_Click(object sender, EventArgs e)

    {

    String urlString = Server.HtmlEncode(textFavoriteURL.Text);

    if (Profile.FavoriteURLs == null)

    {

    Profile.FavoriteURLs = new

    System.Collections.Specialized.StringCollection();

    }

    Profile.FavoriteURLs.Add(urlString);

     

    ///this method call just binds the data to the list box called DisplayFavorite.

    DisplayFavoriteURLs();

     

     

     

    }

    Any advice welcome

     

    amereto

     

     

Page 1 of 1 (1 items)