Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "avanekar02"

ok i have created a view in the frontend called feedback and in the controller folder a feedback controller from the view feedback.cshtml i want to accept data and when i submit the form i want an action in the feedback controller to be called..

Thanks Anwar

Hello

how do i call a function from a view in frontend the funtion is defined in the controller as follows

using Abp.Domain.Uow;
using Samit.CmsProTest.School.Courses;
using Samit.CmsProTest.School.Courses.Dto;
using Samit.CmsProTest.Web.Models;
using Samit.CmsProTest.Web.Models.FeedBack;
using System.Web.Mvc;

namespace Samit.CmsProTest.Web.Controllers
{
    public class FeedBackController : CmsProTestControllerBase
    {
        private readonly ICourseDtlAppService _courseDtlAppService;

        public FeedBackController(ICourseDtlAppService courseDtlAppService)
        {
            _courseDtlAppService = courseDtlAppService;
        }

        public ActionResult Index(FeedBackViewModel feedbackViewModel)
        {

            var model = new FeedBackViewModel();

            return View(model);
        }


        public ActionResult FeedBack(FeedBackViewModel feedbackViewModel)
        {

            var model = new FeedBackViewModel();

            return View(model);
        }

    }
}

this is the error i get

HTTP Error 400.0 - Empty or invalid anti forgery header token. shown below is cshtml and controller file

This is my form feedback.cshtml

@using Samit.CmsProTest.Web.Navigation

@{ ViewBag.CurrentPageName = PageNames.Frontend.FeedBack; }

<div class="row"> <div class="col-md-12 page-404"> <div class="number font-red"> @L("FeedBack") </div> <div class="details" style="width:40%"> <form class="feedback-form" action="@Url.Action("FeedBack")" method="post">

            &lt;div class=&quot;form-group&quot;&gt;
                &lt;label class=&quot;control-label visible-ie8 visible-ie9&quot;&gt;@L("Name")&lt;/label&gt;
                &lt;input class=&quot;form-control placeholder-no-fix&quot; type=&quot;text&quot; placeholder=&quot;@L(&quot;Name&quot;)&quot; name=&quot;Name&quot; required value=&quot;@Model.Name&quot; maxlength=&quot;@Samit.CmsProTest.Authorization.Users.User.MaxNameLength&quot; /&gt;
            &lt;/div&gt;
            &lt;div class=&quot;form-group&quot;&gt;
                &lt;label class=&quot;control-label visible-ie8 visible-ie9&quot;&gt;@L("EmailAddress")&lt;/label&gt;
                &lt;input class=&quot;form-control placeholder-no-fix&quot; type=&quot;email&quot; placeholder=&quot;@L(&quot;EmailAddress&quot;)&quot; name=&quot;EmailAddress&quot; required value=&quot;@Model.EmailAddress&quot; maxlength=&quot;@Samit.CmsProTest.Authorization.Users.User.MaxEmailAddressLength&quot; /&gt;
            &lt;/div&gt;
            &lt;div class=&quot;form-group &quot;&gt;
                &lt;label class=&quot;control-label visible-ie8 visible-ie9&quot;&gt;@L("FeedBack")&lt;/label&gt;
                &lt;textarea class=&quot;form-control&quot; rows=&quot;5&quot; placeholder=&quot;@L(&quot;FeedBack&quot;)&quot; name=&quot;Suggestions&quot; required value=&quot;@Model.Suggestions&quot;&gt;&lt;/textarea&gt;
            &lt;/div&gt;
            &lt;div class=&quot;form-actions&quot;&gt;
             
                &lt;a href=&quot;@Url.Action(&quot;Index&quot;, &quot;FeedBack&quot;)&quot;&gt;     &lt;/a&gt;
                &lt;button type=&quot;submit&quot; class=&quot;btn btn-success uppercase pull-right&quot;&gt;@L("Submit")&lt;/button&gt;
            &lt;/div&gt;
        &lt;/form&gt;
    &lt;/div&gt;
&lt;/div&gt;

</div>


FeedBackController

using Abp.Domain.Uow; using Samit.CmsProTest.School.Courses; using Samit.CmsProTest.School.Courses.Dto; using Samit.CmsProTest.Web.Models; using Samit.CmsProTest.Web.Models.FeedBack; using System.Web.Mvc;

namespace Samit.CmsProTest.Web.Controllers { public class FeedBackController : CmsProTestControllerBase { private readonly ICourseDtlAppService _courseDtlAppService;

    public FeedBackController(ICourseDtlAppService courseDtlAppService)
    {
        _courseDtlAppService = courseDtlAppService;
    }

    public ActionResult Index(FeedBackViewModel feedbackViewModel)
    {

        var model = new FeedBackViewModel();

        return View(model);
    }

    [HttpPost]
    [UnitOfWork]
    public ActionResult FeedBack(FeedBackViewModel feedBackModel)
    {
        var model = new FeedBackViewModel();

        return View(model);
    }


}

}

can you pint me to a page, please

Hello Brother

How can i display site statistics like total number of visitors visited my site.

Regards Anwar

Can you please check help me out here i need to send email from front end pages

Hello

Can you show me how i can send email from a FrontEnd page using EmailSender.

Thanks

Anwar

i have sent my project code, main problem is i think date getting converted to arabic when saving what i mean is i need to set the date to arabic when the language is chnaged to arabic and data entered it saves , but when the same record is edited and dat field not touched and the edited record is tried to be saved it gives an error.

i think when the record for the date to be edited is tied to the daterangepicker with the ng-model, it does display on the form but during save some perhaps error occurs .

Regrads Anwar

yes, it works perfectly for english. brother

Hello

when i open the a data for editing it throws validation error, please note if i change the said date from datetimepicker it saves correctly but if i dont change the date and change any other field it throws this error. also note that the error is from date field only becuase when i commented the date statement in the update function it saves.

also when i did a trace i noticed that the field that is tied to the ng-model if not changed shows value as system.datetime.

thanks Anwar

Showing 211 to 220 of 315 entries