using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace WindowsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { String ln = textBox1.Text; if (!ln.StartsWith("<") || !ln.EndsWith(">")) { MessageBox.Show("Ikke korrekt HTML tag"); return; } else { textBox2.Text = "korrekt HTML tag \r\n"; ln = ln.Substring(1, ln.Length - 2); if (ln.IndexOf('=') == -1) { textBox2.Text += "Navn: '" + ln + "' \r\n"; } } } } }