hyperlinks displayed in checkbox list

Here is it ,I am trying to do :-
I got list of files uploaded into my system. All those uploaded files need to be displayed. Now the user has the option of removing any of those uploaded files.
By grouping hyperlinks in to checkbox list, the user can select(check) the files he things of removing and click the remove button

<%@ Page Language="C#" %>
<script  runat="server">

void CheckMe(Object Sender, EventArgs E)
{
  int i;
   messg.Text="<p>Selected Item(s):</p>";
   for (i=0; i<check1.Items.Count; i++)
   {
     if (check1.Items[i].Selected)
       messg.Text+=check1.Items[i].Text + "<br />";
   }
}
</script>

<html>
<body>
<form runat="server">
<asp:CheckBoxList id="check1" AutoPostBack="True" TextAlign="Right" OnSelectedIndexChanged="CheckMe" runat="server">
<asp:ListItem>Item 1</asp:ListItem>
<asp:ListItem>Item 2</asp:ListItem>
<asp:ListItem>Item 3</asp:ListItem>
<asp:ListItem>Item 4</asp:ListItem>
<asp:ListItem>Item 5</asp:ListItem>
<asp:ListItem>Item 6</asp:ListItem>
</asp:CheckBoxList>
<br />
<asp:label id="messg" runat="server"/>
<br />
 <asp:Button id="ButtonRemove" runat="server" Text="Remove"></asp:Button>
</form>
</body>
</html>

I need to display hyperlinks in the checkbox list.
Item1, Item2, Item3, Item4, Item5, Item6 should all be hyperlinks.

And also

Upon selection of those checkboxes and click of Removebutton, those hyperlinks are removed.

Thanks,
Jay

jayvitAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

djhexCommented:
30 points this guy must be kidding
jayvitAuthor Commented:
Ok, I increased 50 points

Jay
djhexCommented:
     <asp:CheckBoxList id="check1" AutoPostBack="True" TextAlign="Right"
                        runat="server">
                        <asp:ListItem>
                              <a href="www.google.com">Item 1</a></asp:ListItem>
                        <asp:ListItem>Item 2</asp:ListItem>
                        <asp:ListItem>Item 3</asp:ListItem>
                        <asp:ListItem>Item 4</asp:ListItem>
                        <asp:ListItem>Item 5</asp:ListItem>
                        <asp:ListItem>Item 6</asp:ListItem>
                  </asp:CheckBoxList>
Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

randeepsCommented:
Jayvit, experts over here work for the points ... so dont be stingy.

djhexCommented:
Yes A question minimum must be for 125 -250 points.

a 50 questions is  a theorical question for example

jayvitAuthor Commented:
Ok, djhex

You showed me the static way. I appreciate that. How, about if I wanna make an addition of items in runtime with hyperlink controls to that. I will hike the point value on it.

I need to add controls in runtime for my actual case. i.e., creating checkbox list and adding items with hyperlinks to it.

Thanks,
Jay
djhexCommented:
I have almost the solution on my hands. I dont want to force you but I need more points
jayvitAuthor Commented:
150 points.

Thanks,
Jay
djhexCommented:
Its not complete at all but it shows the main methods and properties of the checklist. I hope you know to play with these methods.

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace HTTPSender
{
      /// <summary>
      /// Descripción breve de WebForm2.
      /// </summary>
      public class WebForm2 : System.Web.UI.Page
      {
            protected System.Web.UI.WebControls.CheckBoxList check1;
            protected System.Web.UI.WebControls.Label messg;
            protected System.Web.UI.WebControls.Button ButtonRemove;
      
            private void Page_Load(object sender, System.EventArgs e)
            {
                  // Introducir aquí el código de usuario para inicializar la página
                  if(!Page.IsPostBack)
                  {
                        cargarDatos();
                  }
                  
            }

      #region Código generado por el Diseñador de Web Forms
      override protected void OnInit(EventArgs e)
{
      //
      // CODEGEN: llamada requerida por el Diseñador de Web Forms ASP.NET.
      //
      InitializeComponent();
      base.OnInit(e);
}
            
      /// <summary>
      /// Método necesario para admitir el Diseñador. No se puede modificar
      /// el contenido del método con el editor de código.
      /// </summary>
      private void InitializeComponent()
{    
            this.check1.SelectedIndexChanged += new System.EventHandler(this.check1_SelectedIndexChanged);
            this.Load += new System.EventHandler(this.Page_Load);

      }
      #endregion

      private void cargarDatos()
      {
            check1.Items.Add(new ListItem("<a href='http://www.google.com'>Google</a>", "Value1"));
            check1.Items.Add(new ListItem("<a href='http://www.deo.com'>Deo</a>", "Value2"));


      }

            private void borrarDatos()
            {
//                  for (int i=0; i<check1.Items.Count; i++)
//                  {
//                        check1.Items.RemoveAt(i);
//                  }
            }
      
            private void check1_SelectedIndexChanged(object sender, System.EventArgs e)
            {
                  for (int i=0; i<check1.Items.Count; i++)
                  {
                        if (check1.SelectedValue=="Value1")
                        {
                              //borrarDatos();
                              check1.Items.RemoveAt(0);
                              //check1.Items.RemoveAt(1);
                              
                              check1.Items.Add(new ListItem("Google", "Value1"));
                              check1.Items.Add(new ListItem("<a href='http://www.deo.com'>Deo</a>", "value2"));
                              
                        }
                  }
            }

            
}
}

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.