internet explorer prompts to open or save the file when i click on Custom insert button which is integrated with grid

2 posts, 0 answers
  1. Greg
    Greg avatar
    20 posts
    Member since:
    May 2012

    Posted 16 Apr 2013 Link to this post

    My insert button inside Ajax.beginform().
    <div id="createDescriptors">
    @using (Ajax.BeginForm(

    "InsertDescriptors",
    new { id = Model.CitationID},

    new AjaxOptions()
    {

    UpdateTargetId = "createDescriptors",
    HttpMethod = "post",


    }


    ) )

    {

    <div class="grid">
    <div class="row gridRow">
    <div class="span1">
    <input type="image" id="btnInsertDes" src="~/Content/Icons/Add.png">
    Insert
    </div>
    <div class="span1">
    <input type="image" id="btnEditDes" src="~/Content/Icons/Edit.png" >
    Edit
    </div>
    <div class="span1">
    <input type="image" id="btnDeleteDes" src="~/Content/Icons/Delete.png">
    Delete
    </div>
    <div class="span1">
    <input type="image" id="btnSaveDes" src="~/Content/Icons/Save.png" >
    Save
    </div>

    </div>
    </div>
     
    and here is my controller Action method:
    public JsonResult InsertDescriptors([DataSourceRequest] DataSourceRequest request, CitationDescriptor citationDescriptor, int id)
    {

    citationDescriptor.CitationID = id;
    citationDescriptor.DBProviderID = 1;

    if( citationDescriptor != null && (ModelState.IsValid))
    {
    Db.Descriptors.Add(citationDescriptor);
    Db.SaveChanges();
    }

    return Json(new[] { citationDescriptor }.ToDataSourceResult(request, ModelState), "application/json");


    }

    Thanks for your help!
    VANDANA
  2. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 18 Apr 2013 Link to this post

    Hello Greg,

    It is not getting clear what is the issue that you experience. Describe in more details and if possible create a jsbin to demonstrate the case.

    Regards,
    Petur Subev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top