Home Using a Razor Helper in Htmk.BeginForm() Body
 My Problem is that the "Html.BeginForm()" does not find the tag:name in the helper function. The action "Details" in the "ProdukteController" takes a FormCollection as argument. When i try to access formcollection.name I can only access the value "kategorie" which is in the same file as the "Html.BeginForm()". As you see, my helpers generate a dropdown with optgroup and the opt tag which are selectable. As mentioned i cant access the data selected by the user in the helper. Using Html.BeginForms() in the helper is not possible. I tried uncludeing @using System.Web.Mvc.Html; in the helper but that didnt work. ( I left out the databaseconnections in the helpers so we dont have too much code in here) Thanks for reading and thanks in advance for your help! using (Html.BeginForm("Details", "Produkte")) {
} helper.oberkat while (r.Read()) { if (r["pk_ID_Kategorie"].ToString() == r["Oberkategorie"].ToString()) { @unterkat(r["pk_ID_Kategorie"].ToString()) } } helper.unterkat while (r.Read()) { if (r["Oberkategorie"].ToString() == oberkat && kategorie.ToString() == @r["pk_ID_Kategorie"].ToString()) { } else if (r["Oberkategorie"].ToString() == oberkat) { }