protected void cmdSaveByURI_onclick(object sender, ImageClickEventArgs e) { Edit.Utilities.DataIO data = new Profiles.Edit.Utilities.DataIO(); if (txtURI.Text.ToLower().Trim() != string.Empty) { string uri = string.Empty; bool validuri = false; bool urifound = false; XmlNamespaceManager nmsmanager = null; pnlAddByURI.Visible = false; //you need to get back the actual URI that is discovered during the post. //The post might be to an HTML document where I have to look for an alt link to RDF data. //Plus the URI we get back from this method needs to be used to create a triple in our Database so dont lose it. XmlDocument rtndata = data.GetURIRelLink(txtURI.Text.Trim(), ref uri); if (rtndata.InnerXml != string.Empty) { urifound = true; } if (urifound) { Framework.Utilities.Namespace namespaces = new Namespace(); nmsmanager = namespaces.LoadNamespaces(rtndata); if (rtndata.SelectSingleNode("rdf:RDF/rdf:Description/rdf:type[@rdf:resource='" + PropertyList[0].Value + "']", nmsmanager) != null) { validuri = true; } } if (uri.Trim() != string.Empty) { litAddByURIConfirmLabel.Text = rtndata.SelectSingleNode("rdf:RDF/rdf:Description[@rdf:about='" + uri + "']/rdfs:label", nmsmanager).InnerText; hdnURI.Value = uri; } else { litAddByURIConfirmLabel.Text = txtURI.Text.Trim(); hdnURI.Value = txtURI.Text.Trim(); } if (validuri) { litAddByURIConfirmType.Text = PropertyList[0].Text; } else if (!urifound) { litAddByURIConfirmType.Text = "The item could not be found. Do you still want to add this URL?"; } else if (!validuri) { litAddByURIConfirmType.Text = "The item type is invalid. Do you want to add this item anyway?"; } pnlAddByURIConfirm.Visible = true; pnlAddBySearch.Visible = false; pnlAddNew.Visible = false; pnlAddByURI.Visible = false; phAddBySearch.Visible = false; phAddNew.Visible = false; phAddByURL.Visible = true; imgAddArror.ImageUrl = "~/Framework/Images/icon_squareDownArrow.gif"; Session["pnlAddByURI.Visible"] = true; } }