forms - Request returns a URL that is to long -


I am working on the site with a lot of text boxes but when I request back to the site, And the error says that my URL is long because I request the form to send form information as URL, or am I wrong?

Anyway, what I see is a way to fix this problem.

Start.cshtml @handbook. With Epaca @ system. Text @ {ViewBag.Title = "start"; Layout = "~ / scene / share / _Layout.cshtml"; Stringbilder term text = new stringbuilder (); If (Question Answer: Diagnosis Question No. == 0) {TempClass.setQuestions (); } List & lt; Question & gt; Temp = QuestionArray.Instance.Questions; & Lt; String & gt; Categories = new list & lt; String & gt; (); Foreign exchange (question question in question) Diagnosis Question) {bool newCat = true; Foreign currency (different E in categories) {if (z.Categori == e) {newCat = false; }} If (newcat) {categories.Add (z.Categori); }} If (request ["btn"] == "save") {quote intermediate Question = zero; QuestionArray.Instance.Questions = New list & lt; Question & gt; (); Fortecha (var q in temp) {var qTemp = new question (); QTemp = q; QTemp.Answer = Request.Unvalidated ("Q" + q.Id); QuestionArray.Instance.Questions.Add (qTemp); } WordText.Append ("& lt; h1 style = 'text-align: center;'> wormmer hnn bgn "); Foreign (categories in Works X) {wordText.Append ("& lt; h3 style = 'text-align: center;'>" + x + ""); Forex currency (var x2 question question in question.) {If (x2.Categori == x) {wordText.Append ("& lt; p>" + x2. Reply + " "); }}} DocumentHandler.GenerateDocument (wordText.ToString ()); }} & lt; div style = "margin: auto; width: 600px;" Class = "hidden print" & gt; & Lt; Form role = "form" & gt; @ {Foreach (categories x var) {& lt; H2 & gt; @ X & lt; / H2 & gt; foreach (var x2 in question example.Questions) {if (x2.Categori == x) {string tempId = "question" + x2.Id; & Lt; div class = "form-group" & gt; & Lt; Label & gt; @ x2.MyQuestion & lt; / Labels & gt; & Lt; textarea class = "form-control" style = "height: 200px;" Name = "@ tempId" & gt; & Lt; / Text field & gt; & Lt; / Div & gt; }} & lt; Hour style = "height: 3px; background-color: # 333;" / & Gt; }} & Lt; Button type = "submit" class = "btn btn-success" & gt; Efstate & lt; / Button & gt; & Lt; Button type = "submit" name = "btn" value = "save" class = "btn btn-success"> Gem & lt; / Button & gt; & Lt; / Form & gt; & Lt; / Div & gt;

DocumentHandler.cs

 using the  system; Using System.Collections.Generic; Using System.Linq; Using System.Web; Using System.Web.Http.Filters; Using System.Web.Mvc; Using System.Text; Namespace Handbook. App_Code {Public class document handler {public static zero generated document (string code) {HttpContext.Current.Response.Clear (); HttpContext.Current.Response.Charset = ""; HttpContext.Current.Response.ContentType = "App / MS Word"; StrfileName = "GenerateDocument" + ".doc"; HttpContext.Current.Response.AddHeader ("content-dispute", "inline; filename =" + strFileName); StringBuilder Strawfarm Content = New StringBuilder (); strtmlcontent.Append ("& lt; html" + "lang = 'da' xml: lang = 'da'" + "xmlns: o = 'vase: schemas-microsoft-com: office: office'" + "xmlns: w = 'Color- Microsoft-Com: Office: Word' "+" XMLNs = 'http: //www.w3.org/TR/REC-html40&> "+" & gt; Head & gt; & lt; Meta Charset = 'UTF-8' / & gt; & gt; Title & gt; Time & lt; / title & gt; "); // Settings default web layout strHtmlContent.Append (instead of "& lt;! - [if gte mso 9]> gt0" + "& lt; xml & gt;" + "& lt; w: WordDocument & gt;" + " & lt; w: View & gt; Print & lt; / w: Scene & gt; "+" & gt; Zoom & gt; 90 & lt; / w: Zoom & gt; "+" & lt; w: DoNotOptimizeForBrowser /> "+" & Lt; / w: Word document> "+" & lt; / xml & gt; "+" & lt ;! [Andif] - & gt; "); StrHTMLContent.Append ("& gt; Style & gt;" + " "); StrHTMLContent.Append ("& lt; body style = 'tab-interval: .5in' & gt;" + code + "& lt; / body & gt; & lt; / html & gt;"); HttpContext.Current.Response.Write (strHTMLContent); HttpContext.Current.Response.End (); HttpContext.Current.Response.Flush (); }}   

By the way, I am working in MVC 4

edit I am looking at my code, and some more Trap And what can I see to the extent of the approved URL, I have to increase traffic to my site. Which is not what I want, so if a person has an idea of ​​fulfilling this request. But I will be happy to get the same result.

The problem was found in my form in method = "post" < / Code>

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -