Yet another bug found in ASP.NET.

I was working on a new project, and I had to submit the form to another form. Guess what? I couldn't.

Then, with Lutz Roeder's Reflector, I managed to trace the bug down to HtmlForm's RenderAttributes method, which reads like the code below.

Whoever  wrote the following code should be fired from Microsoft!

protected override void RenderAttributes(HtmlTextWriter writer)
{

string text1;
writer.WriteAttribute("name", this.Name);
base.Attributes.Remove("name");
writer.WriteAttribute("method", this.Method);
base.Attributes.Remove("method");
writer.WriteAttribute("action", this.GetActionAttribute(), 1);
base.Attributes.Remove("action");
text1 = base.Page.ClientOnSubmitEvent;
if ((text1 != null) && (text1.Length > 0))
{
if (base.Attributes["onsubmit"] != null)
{
text1 = string.Concat(text1, base.Attributes["onsubmit"]);
base.Attributes.Remove("onsubmit");
}
writer.WriteAttribute("language", "javascript");
writer.WriteAttribute("onsubmit", text1);
}
if (base.ID == null)
{
writer.WriteAttribute("id", base.ClientID);
}
base.RenderAttributes(writer);
}