Hi,
here 'm providing some code to display some error while you entered existing tag in xml
protected void Button1_Click(object sender, EventArgs e)
{
XmlDocument xmldoc = new XmlDocument();
xmldoc.Load(Server.MapPath ("~/SomeFiles/XMLFile2.xml"));
XmlNodeList xmlnodli = xmldoc.GetElementsByTagName(TextBox1.Text);
if (xmlnodli.Count > 0)
{
Label1.Text = "your enter tag is already exists";
Label1.Visible = true;
}
}
I hope this code helps you.
All the best