I got a hyperlink column in my list. Then i got a search to the list and when it shows the answer in a textbox i get duplicate. Lets say, i'm saving http://www.google.se to the list, but when i get the answer after searching in the list it shows http://www.google.se http://www.google.se . any solutions?
Code in my search button:
protected void ButtonChoose_Click(object sender, EventArgs e)
{
try
{
using (SPSite site = new SPSite("http://knowitintranet:9797/sites/News"))
{
LabelAuthor.Text = string.Empty;
LabelShowTitle.Text = string.Empty;
LabelShowDate.Text = string.Empty;
LabelContent.Text = string.Empty;
LabelLinks.Text = string.Empty;
SPWeb web = SPContext.Current.Web;
SPList list = web.Lists.TryGetList(DropDownListCategory2.SelectedItem.Value);
SPListItemCollection items = list.GetItems();
foreach (SPListItem item in items)
{
LabelShowTitle.Text = item["Title"].ToString();
LabelAuthor.Text = item["Authors"].ToString();
LabelContent.Text = item["Contents"].ToString();
LabelLinks.Text = item["Links"].ToString();
LabelShowDate.Text = item["Date"].ToString();
}
site.Dispose();
}
}
catch (Exception x)
{
LabelException.Text = x.Message;
}
}