Note that there are some explanatory texts on larger screens.

plurals
  1. POC# for Confirm box when click on the button
    text
    copied!<p>net MVC3.following is my view,</p> <pre><code> @using (Html.BeginForm("InsertDetails", "Home")) { &lt;h2 class="filter"&gt;Associate Details&lt;/h2&gt; &lt;fieldset class="fs"&gt; @foreach (var item in Model.lstTravelReadyEntities) { &lt;label class="Detail1" &gt;&lt;b&gt;Associate Id : &lt;/b&gt;&lt;input type="text" name="Aid" style="border-color:White;" value=@item.Var_AssoId &gt;&lt;/label&gt; &lt;label class="Detail1"&gt;&lt;b&gt;Vertical :&lt;/b&gt;&lt;input type="text" name="vertical" style="border-color:White;" value=@item.Var_Vertical &gt;&lt;/label&gt; &lt;label class="Detail1"&gt;&lt;b&gt;Visa ValidFrom :&lt;/b&gt;&lt;input type="text" name="vvf" style="border-color:White;" value=@item.Dt_VisaValidFrom &gt; &lt;/label&gt;&lt;br /&gt;&lt;br /&gt; &lt;label class="Detail2"&gt;&lt;b&gt;Associate Name :&lt;/b&gt;&lt;input type="text" name="AsName" style="border-color:White;" value=@item.Var_AssociateName &gt;&lt;/label&gt; &lt;label class="Detail2"&gt;&lt;b&gt;Account Name :&lt;/b&gt;&lt;input type="text" name="Acname" style="border-color:White;" value=@item.Var_AccountName &gt;&lt;/label&gt; &lt;label class="Detail2"&gt;&lt;b&gt;Visa ValidDate :&lt;/b&gt;&lt;input type="text" name="vvt" style="border-color:White;" value=@item.Dt_VisaValidTill &gt;&lt;/label&gt;&lt;br /&gt;&lt;br /&gt; &lt;label class="Detail3"&gt;&lt;b&gt;Grade HR :&lt;/b&gt;&lt;input type="text" name="gh" style="border-color:White;" value=@item.Var_Grade &gt;&lt;/label&gt; &lt;label class="Detail3"&gt;&lt;b&gt;Project Name :&lt;/b&gt;&lt;input type="text" name="Projname" style="border-color:White;" value=@item.Var_Project_Desc &gt;&lt;/label&gt;&lt;br /&gt; &lt;label class="Detail3" style="visibility:hidden"&gt;&lt;b&gt;geo :&lt;/b&gt;&lt;input type="text" name="geo" style="border-color:White;" value=@item.Var_Geo &gt;&lt;/label&gt;&lt;br /&gt; } &lt;h2&gt; Response Details&lt;/h2&gt;&lt;br /&gt; Supervisor Response :&lt;input type="radio" class="radi" name="radio" value="yes" onclick="javascript:Getfunc(this.value);"&gt;Yes &lt;input type="radio" name="radio" value="no" onclick="javascript:Getfunc(this.value)"&gt;No &lt;div id="es"&gt;&lt;/div&gt; &lt;input type="submit" id="insert" value="Submit" name="Submit"/&gt; &lt;/fieldset&gt; } </code></pre> <p>And my following Controller,</p> <pre><code> [AcceptVerbs(HttpVerbs.Post)] public string InsertDetails(FormCollection collection) { TravelReadyModel oTravelReadyModel = new TravelReadyModel(); string supervisorip =collection.Get("radio"); int id = Convert.ToInt32(collection.Get("Aid")); string vertical = collection.Get("vertical"); DateTime validfrom = Convert.ToDateTime(collection.Get("vvf")); string account = collection.Get("Acname"); DateTime validtill = Convert.ToDateTime(collection.Get("vvt")); string grade = collection.Get("gh"); string projectname = collection.Get("Projname"); DateTime tdate = Convert.ToDateTime(collection.Get("date")); int commentid = 5; string comment = collection.Get("comment"); string geo = collection.Get("geo"); oTravelReadyModel.InsertTravelDetails(tdate, id, vertical, account, geo, validfrom, validtill, grade, projectname, supervisorip, commentid, comment); return "true"; } </code></pre> <p>I want to get the innertext in the same page when the record has been inserted.what i have to return to get the success message in the same page?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload