Save input data from popup modal MVC

Hi I am trying to save data from popup. When I execute my controller side data is not saved. Please see code below:
View:
@model IEnumerable<Model>
    <h2>Manage Dimension</h2>
       <link href="@Url.Content("~/Content/Gridmvc.css")" rel="stylesheet" type="text/css" />
       <script src="@Url.Content("~/Scripts/gridmvc.min.js")" type="text/javascript"> </script>
      <script src="@Url.Content("~/Scripts/js/bootstrap.min.js")" type="text/javascript"> </script>
      <link href="@Url.Content("~/Content/bootstrap/css/bootstrap.min.css")" rel="stylesheet" type="text/css" />
      <link href="@Url.Content("~/Content/bootstrap/css/bootstrap-responsive.min.css")" rel="stylesheet" type="text/css" />
@using (Html.BeginForm())
    @Html.AntiForgeryToken()
    @*<html>*@
    <body>
        <hr />
        <div class="table-responsive">
            <table class="table table-striped  table-hover">
                <thead>
                    <tr>
                        <th>
                            ID
                        </th>
                        <th>
                            Name
                        </th>
                        <th>
                            Value
                        </th>
                        <th>
                            Action
                        </th>
                    </tr>
                    @foreach (var item in Model)
                        foreach (var i in item.Values)
                            <tr>
                                <td>
                                    <span data-bind="text: ID">@item.ID</span>
                                </td>
                                <td>
                                    <span data-bind="text: Name">@item.Name</span>
                                </td>
                                <td>
                                    <span data-bind="text: Value">@i.Value</span>
                                </td>
                                <td>
                                    <button type="button" class="edit-mode" data-toggle="modal" data-target="#myModal" id="c.ResellerId">edit</button>
                                </td>
                            </tr>
            </table>
            <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                            <h4 class="modal-title" id="myModalLabel">Edit/Add Dimension</h4>
                        </div>
                        <div class="modal-body">
                            <div id="dialog-form" title="Create new user">            
                                <form>
                                    <fieldset>
                                        <label for="name">Name</label>
                                        <input type="text" name="name" id="name" value="" class="text ui-widget-content
ui-corner-all"><br /><br />
                                        <label for="email">Value</label>
                                        <input type="text" name="value" id="value" value="" class="text ui-widget-content
ui-corner-all">
                                    </fieldset>
                                </form>
                            </div>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                            <button type="button" class="btn btn-default"  id="inviteRequest">Save changes</button>
                        </div>
                    </div>
                </div>
            </div>  
            <br />
            <br />
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" data-dismiss="modal" data-toggle="modal" data-target="#myModal" data-bind="click: Save">Add</button>
            </div>
            <script src="~/Scripts/App/Modal.js"></script>
            @*<script type="text/javascript" src="https://ajax.microsoft.com/ajax/jQuery/jquery-1.4.2.min.js"></script>*@
            @*<script src="@Url.Content("~/Scripts/js/bootstrap.min.js")" type="text/javascript"> </script>*@
            <script type="text/javascript">
                $(document).ready(function () {
                    $('#inviteRequest').click(function () {
                        console.log(1);
                        $('#myModal').modal('hide');
                        $.post('/ManageDimension/Create', { "Name": name, "Value": value })
                        alert("You clicked me!");
                        window.location.reload(true);
            </script>
        </div>       
    </body>
</html>
 Controller:
  [HttpPost]
        public ActionResult Create( DataModel dimension)
            if (ModelState.IsValid)
                db.Save(dimension);
                return RedirectToAction("Index");
            else
                return View(dimension); 

Hi,
This is a forum for Visio.
To get more professional support, I recommend you post this question in MVC forum.
http://forums.asp.net/1146.aspx/1?MVC
The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who
read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
Regards,
Greta Ge CHN
TechNet Community Support

Similar Messages

  • BADI for transfering data from one modal to another modal within single appset

    Hallo Experts,
    My Business Requirement is Transfer of data from one modal to another in same environment and did this taking reference from below document.(How to custom badi for replicating destination app)
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e04b5d24-085f-2c10-d5a2-c1153a9f9346?QuickLink=index&…
    Document contains TR for implementing BADI, but this document supports bpc version 7.0 and we are using is bpc 10.0.
    So i make all compatible changes in BADI implementation and activate it. Now i am testing using transaction UJKT using following script.
    and the result is records successfully written back to application MIS, but when i check data is not moved to target application MIS.
    I am facing stuck situation in my project work. Please Suggest. Hope for positive reply.
    Script:
    *XDIM_MEMBERSET WM_ACCOUNT = WM_041,
    *XDIM_MEMBERSET WM_UOM_02 = UOM_004
    *XDIM_MEMBERSET WM_UD_2 = WM_07
    *XDIM_MEMBERSET WD_EXT_MAT_GRP =CHALK-PH-I,CHALK-PH-II,CHAVN-PH-I,CHAVN-PH-II,NASHIK-WM,RAJASTHAN-WM,TAMILNADU-WM
    *XDIM_MEMBERSET CATEGORY= Plan
    *XDIM_MEMBERSET AUDITTRAIL=Input
    *XDIM_MEMBERSET P_ENTITY = SIL
    *XDIM_MEMBERSET RPTCURRENCY = LC
    *START_BADI DAPP
       DESTINATION_APP ="MIS"
       RENAME_DIM ="WD_EXT_MAT_GRP= PRODUCT"
       ADD_DIM ="PLANT=NO_PLANT","MIS_ACCOUNTS=CAIN0058040008","COST_CENTER=NO_COST_CENTER","FLOW=Opening","UOM=AMT","CUSTOMER_SALES_2=NO_CUSTOMER","CATEGORY=Plan","AUDITTRAIL=Input"             
       DEBUG = ON
       WRITE = OFF
       QUERY = ON
    *END_BADI
    Please find attached result.
    Regards,
    Dipesh Mudras.

    Hello,
    Here is the manual to copy data between apps (it works with BPC NW75):
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0480970-894f-2d10-f9a5-d4b1160be203?quicklink=index&overridelayout=true
    It works me, but now I need to modify the Script Logic to make that a "property" from the origin dimension has to be copied to the destination dimension as "id", like follow:
    //*XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%
    //*XDIM_MEMBERSET TIME = %TIME_SET%
    //*XDIM_MEMBERSET ENTITY = %ENTITY_SET%
    //*XDIM_MEMBERSET RPTCURRENCY =  %RPTCURRENCY_SET%
    *START_BADI FiltroPD
         WRITE = OFF
         APPL = $APPLICATION$
         ADD_DIM = "ORIGEN = APPVENTAS"
         ADD_DIM ="O_COSTE = no_input"
         ADD_DIM="CECO = no_input"
         RENAME_DIM="P_ACCT = RATIOS.P_ACCT "
    *END_BADI

  • How to pass the selected table row data from popup to source view

    Hi ,
    I have requirement of passing the data from popup view to source. , searching some data in  popup view and displaying in table,
    Like i am passing some input and click search button will display the data in table, when select any of the row in the table and click on the another button , i should be able to pass the select row to the source view and also should close the popup.
    When i implement , In the popup windiw, when i enter the customer no, and click on search button, it is closing the popup itslef. not able to see the data in popup.
    Can u tell me what is that soultion.
    Regards
    Vijay

    Hi Harsimran
    Thanks for the reply,
    1) Source view
    In  "Source View" i have input field called Customer_no. But,  the end user will not have any idea , what customer no to enter. so i am searching the customer no in the popup view.
    1) Customer_no( This is an inputfiled , to get the customer no from the popup view)
    2) Get Customer NO( This is a button to call the popup view)
    "Get Customer NO" This button action will open the popup view.
    In this popup, i have
    1) Input field (To enter the search term)
    2) Search (To seach the customer no based on the search term)
    3) Table ( To display the search data)
    4) Button in Table tool bar called "Select" .( To close the popup view after selected the required data in the table to pass it back to the source view).
    so in the popup view what happening is, when i click on the search button itself , it is closing the popupview  by transfering the first row of the tbale ,with out select the required row in the table.
    i need to close the window after click on the "Select" button in the toolbar , after selected the required row data to trasfer in the table.
    Can u pelase tell me what are the modifcations i need to do it.
    Regards
    Vijay

  • Save Input Data to Excel in Siena

    Guys,
    Quick (and hopefully) easy question regarding Project Siena and Excel:
    I have a single screen (Screen1) and an Input Text Field (Input1) and a Gallery (Gallery1):
    I am wanting to have a user enter a numeric value into Input1, say 100,000.
    Once that value is entered, I would like to save it in Excel, conduct numerous calculations on the Excel value (Input1)  and then present the new numbers to the user in Gallery1.
    My question: Is there a way to save inputted data into an Excel data source?
    Thanks,
    Chris

    Chris,
       You can save data in Siena, you just can't write that data to a file such as Excel right now.   If I understand you correctly, you should try the following:
    Change the OnChange property of Input1 to:
    UpdateContext({MyValue: Value(Input1!Text)/2})
    Explanation:
    This creates and updates a variable called MyValue.   The name is unimportant, and you can call it whatever you want, as long as you use the same name when you reference it elsewhere.
    It sets the value of MyValue to whatever the user inputs in Input1 divided by 2.   The actual math doesn't have to be what I wrote, this is just an easy example.  
    Create a Label and set its Text to:
    MyValue
    This will display the value.  
    To get this to display on another page, you need to pass the context.  To do this, create a button, and set its OnSelect property to:
    Navigate(Screen2,"",{MyValue: MyValue})
    This Navigates to the page called Screen2, and sets MyValue (for Screen2) to MyValue (from Screen1).
    This is assuming you only want one number stored, you can also do all of the above using collect().   If you use a collection, you won't have to pass the context between screens.   A list of Functional References can be found
    HERE:
    -Bruton
    Just let us know if you also want an example of using this in a collection.

  • Save triggered data from 2 modules

    I am using SignalExpress (3.0) with USB cDAQ-9172, a NI9203 current and NI9201 voltage module.  After Acquiring data (continuously), I am using a software trigger on the 9203 current signal to analyze and save the triggered data (collected from all 8 channels on 9203).  However, I am not able to save the data from 9201 voltage module?  It looks like the software trigger only accepts a single module input (I think).  As shown in the attachment "trigger Input.jpg" I can only select 1 module as the input for the software trigger (either the current module or the voltage module)
    Is there any way to trigger on a single channel and then save data from both modules?
    Thanks!
    Ryan
    Solved!
    Go to Solution.
    Attachments:
    trigger Input.JPG ‏32 KB
    Step setup.JPG ‏51 KB

    Hey Ryan!
    You can actually do all of this in one DAQmx Acquire step.  There is a tab in the Acquire step where you can specify your triggering.  Then there is a recording options tab up at the top where you can choose to save your data when the logging starts to a TDMS file that can be read in excel.
    Doug Farrell
    Product Manager - Condition Monitoring
    National Instruments
    National Instruments Condition Monitoring
    Attachments:
    sigex.png ‏21 KB

  • How to retrieve input data from a HTML form in the UTF-8 cha

    I encountered the following problem with a JWeb Application:
    I tried to write a JWeb-Application for OAS 4.0, that retrieves
    input data from a HTML form and writes it into an Oracle
    database.
    All processing should be done in the UTF-8 character set.
    The problem is, that the form data retrieved by getURLParameter
    are always encoded in a non-unicode character set and I found no
    way to change this.
    Can anybody tell me what I should do to get the form data in the
    UTF-8 character set?
    null

    Hi
    Try set in the JWEB application's Java environment such
    SYSTEM_PROPERTY: file.encoding=UTF8.
    Andrew
    Thomas Gertkemper (guest) wrote:
    : I encountered the following problem with a JWeb Application:
    : I tried to write a JWeb-Application for OAS 4.0, that
    retrieves
    : input data from a HTML form and writes it into an Oracle
    : database.
    : All processing should be done in the UTF-8 character set.
    : The problem is, that the form data retrieved by getURLParameter
    : are always encoded in a non-unicode character set and I found
    no
    : way to change this.
    : Can anybody tell me what I should do to get the form data in
    the
    : UTF-8 character set?
    null

  • How to save a datas from serial port?

    How to save a datas from serial port?

    Hi
    I need some help about rs-232 communication. I want to make a vi witch can do this things:
    -read a txt file (to simulate a serial port like when the datas are coming)
    i will get 3 different data in serial port (like this: 121 213 135)
    i want to save in a txt file what datas get my vi
    so
    -write in a txt file or draw in a diagram (or both)
    so my problem is: read in serial port and save in a file and draw a diagram.
    if anybody can help pls HELP ME because im a beginner in this problem.
    I already do something but Im not sure that good.
    Thx for all.

  • Is it possible to save / extract data from a MS SQL database 2008 using lookout 6.2?

    Is it possible to save / extract data from a MS SQL database 2008 using lookout 6.2?
      Now a days we are saving / extracting data in a excel spreadsheet, but we would like to do that using a database because it is better.

    You can use ODBC connection to work with SQL Server database.
    Use SQLExec object to execute the SQL statement. Here is a KB about the SQL statement.
    http://digital.ni.com/public.nsf/allkb/4ADEEA04CD24AE0B862565E20002A16F?OpenDocument
    To write data to spreadsheet is more straightforward because Lookout has built-in spreadsheet object. But you need to write SQL statement by yourself to interact with other database.
    To read the data back is the same way. Just use "select" SQL statement to query. You can use Datatable object to query.
    The "Data Source" can be "DSN = data source name;". The data source name is configured in Control Panel->Administrative Tools->Data Sources(ODBC).
    Ryan Shi
    National Instruments

  • How can i save the data from the Oracle database to my local directory

    How can i save the data from the Oracle database to my local directory instead Of saving the data file to the Directory created on the Oracle Server ?
    I require to design the Procedure which will pull the data from various tables and needs to store the data in the Client's local directory.

    Since SQL*PLUS runs on the client, you can use SQL*PLUS to spool data to your local drive.
    You could also use the database to write a a specified drive where all users have access to (mapped network drive, e.g.). I wouldn't recommend doing it that way, but it is sometimes useful when the files are created in some nightly batch run.

  • Incoming IDOC Error "No batch input data from the screen SAPMV45A 4001"

    Hello ,
    The Incoming IDOC with Message type 'ORDERS' is triggering the error message "No batch input data from the screen SAPMV45A 4001" with message no 00344 . There is an SAP note 785000 to handle this type of error message which has been already implemented. Still we are encountering few IDOC error's  at the time of sales order creation. The IDOC reaches status 51 throwing the error which is again reprocessed through BD87 .
    We are unable to replicate the similar scenerio in Development & Testing systems as it works fine.
    Can any one kindly advise how to eliminate the error "No batch input data from the screen SAPMV45A 4001" message at the time of Incoming IDOC processing.
    Thanks in advance.
    Best Regards
    Sateesh

    Dear Sateesh
    Check this link where the same topic was discussed
    [ VA01/VA02: batch-input error in IDoc processing|http://www.sapfans.com/forums/viewtopic.php?f=21&t=313032]
    thanks
    G. Lakshmipathi

  • Save Temporary data from Standard infotype for 9003 infotype  module pool

    Hi,
         I need to save some data from infortype 0000 screen call that needs to be used in some other program.
    Pleasse suggest any way out.
    Regards,
    Shashank

    need to resolve for new questions..

  • Input data from HANA

    Hi team,
    Would I input data from HANA to ESP.
    I found SAP HANA output adapter, but I seems to be used for output.
    Is there no way that ESP get data from HANA ?
    Thank you in advance.

    Hello,
    A third alternative for getting data from HANA is to use the getData() function:
      http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc01621.0514/doc/html/vge1312573080739.html
    CREATE COLUMN TABLE "SYSTEM"."ALERI" ("C1" INTEGER CS_INT NOT NULL ,
      "C2" INTEGER CS_INT NOT NULL ,
      "C3" INTEGER CS_INT NOT NULL ,
      "C4" VARCHAR(25) CS_FIXEDSTRING NOT NULL ,
      "C5" LONGDATE CS_LONGDATE,
      PRIMARY KEY ("C1")) UNLOAD PRIORITY 5 AUTO MERGE WITH PARAMETERS ('PARTITION_SPEC' = 'HASH 4 C1')
      Insert some data into the "ALERI" table.
    CREATE INPUT stream StockStream SCHEMA (NewColumn1 INTEGER, NewColumn2 INTEGER, NewColumn3 INTEGER, NewColumn4 STRING ,
    NewColumn5 bigdatetime );
    CREATE Flex stock_flex
    IN StockStream
    OUT OUTPUT STREAM stock_traded SCHEMA (c1 INTEGER, c2 INTEGER, c3 INTEGER, c4 STRING, c5 BIGDATETIME)
    BEGIN
      DECLARE
         vector (typeof (stock_traded)) asedata;
      END;
      ON StockStream {
      if(isnull(asedata))
      asedata := new vector(typeof (stock_traded));
      getData(asedata,'HANAODBCService','select * from aleri');
      for(rec in asedata)
      output setOpcode(rec,insert);
      resize(asedata,0);
    END;

  • How to save the data from AI Read.vi?

    Hi,
    The main target is that testing the strength of a object which is extended by a force. The desired results are
    1. The strength of object under the force(main target, I am trying now);
    2. Displacement of object being extended(I have mimicly done);
    3. Images of deformation of the object extended(I have mimicly done).
    4. The sub procedure will stop when the object under testing is broken. I intend to use the big pulse from force sensor by analizing the data acquired.( it is more difficult if using machine vision).
    What I am mainly trying to do now is implementation of a sub vi to collect the data which is acquired from channel 0 of PCI-6052E which is connected to a force sensor. I have tried to use an existing exam
    ple as attached with some modifications. I have tested the data from the sensor by comparing to measurement by multimeter and it takes sense. But
    1. I still don't know how to save data displayed by AI Read.vi? And use what kind data type could save more memory?
    2. I think that memory management is very important because each points of the result includes its strength, image and displacement. How can I acquire enough significant points for the final results being reliable and save these data down to an array or cluster synchronously? (each sub procedure has no time limited)
    3.Because I think that a continuous data acquisition would occupy ALL CPU TIME and their related images and displacements would have no chance to be taken down by CPU at the same moment. Am I right?--I am sure that it is not very difficult problem but my mind is still in caose and the time is quite limited to me now.
    I am looking for your sugguestion or solution or control philosophy too. You can modify the fi
    le attached if you can. I will learn from your idea.
    Thank you very much for your time and energy!
    Your
    Swedlin
    Attachments:
    Acquire_N_Scans_1_10.vi ‏75 KB

    Hello;
    Regarding your question on the data type that would use less storage space, the answer is binary type. Actually, you can use another shipping example as start point of your application. The example I'm mentioning is a data logger, that saves binary data to a file on your hard drive. You can find that example at Search Examples->I/O Interfaces->Data Acquisition->Data Logger->High Speed Data Logger.
    Regarding your question about the CPU time, the statement is valid. In case you use a synchronous AI task, the CPU execution will get stuck inside the AI Read.vi untill the buffer is ready to be read. One thing you can do about that is to change the acquisition task to be asynchronous. There is a good example in Labview showing how you can accomplish that.
    You can find the example at Search Examples->I/O Interfaces->Data Acquisition->Analog Input->DAQ Occurrences.
    You can combine both examples to accomplish the task you need.
    Hope this helps.
    Filipe A.
    Applications Engineer
    National Instruments

  • Trying to save the data from the pdf into XML

    I have Adobe Live Cycle 8.0 installed and without the blade for Reader Extension.
    The objective is to save the editable data from the pdf into a XML file
    the code for that is:
    // to fetch the input pdf file from the local drive
    FileInputStream fileInputStream2 = new FileInputStream("C:\\Adobe-Final PDF\\stitched_Letters.pdf");
    Document inPDF = new Document(fileInputStream2);
    Properties connectionProps=new Properties();
    connectionProps.load(new FileInputStream(_propertiesPath));
    //propertiesPath is the path of the properties file
    ServiceClientFactory myFactory = ServiceClientFactory.createInstance(connectionProps);
    FormDataIntegrationClient dataClient = new FormDataIntegrationClient(myFactory);
    Document resultPDF=dataClient.exportData(inPDF);
    What happens is that this ultimate resultPDF does not get the XML with data but rather with empty tags. Does this require Reader Extension?

    //Set connection properties required to invoke LiveCycle ES
    Properties connectionProps = new Properties();
    connectionProps.setProperty("DSC_DEFAULT_EJB_ENDPOINT", "jnp://localhost:1099");
    connectionProps.setProperty("DSC_TRANSPORT_PROTOCOL","EJB");
    connectionProps.setProperty("DSC_SERVER_TYPE", "JBoss");
    connectionProps.setProperty("DSC_CREDENTIAL_USERNAME", "administrator");
    connectionProps.setProperty("DSC_CREDENTIAL_PASSWORD", "password");
    //Create a ServiceClientFactory object
    ServiceClientFactory myFactory = ServiceClientFactory.createInstance(connectionProps);
    //Create a FormDataIntegrationClient object
    FormDataIntegrationClient dataClient = new FormDataIntegrationClient(myFactory);
    //Reference a PDF form from which to export data
    FileInputStream fileInputStream2 = new FileInputStream("C:\\Adobe\\Loan.pdf");
    Document inputPDF = new Document(fileInputStream2);
    //Export data from the form
    Document resultPDF = dataClient.exportData(inputPDF);
    //Save the exported form data as an XML file
    File resultFile = new File("C:\\Adobe\\formData.xml");
    resultPDF.copyToFile(resultFile);
    }catch (Exception e) {
    e.printStackTrace();

  • How to input data from labview to executable application and export the results back to labview

    I have a simple function written in m file under Matlab enviornment,
    function [c]=myadd2(a,b)
    c=a+b;
    I built it into a executable file (.exe), then I want to call it in labview and get the results.
    I followed this tutorial and some other information on line:
    http://digital.ni.com/public.nsf/allkb/5CF9526FF069EA8E862564C400579DBA
    But I didn't see any telling me how to get the Labview array data input to the EXE file and return the results data back to another indicator in labview.
    Any one have some idea?
    I appreciate the help very much.
    Arnold

    You probably need to include some command line arguments on your executable that would be the name of a file to get the data from. You could also include a command line argument telling that exe where to store the results.
    I am not familiar with Matllab to give you advice on how specifically to do that with your exe though.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

Maybe you are looking for

  • Map Place Additions/Deletions Not Saved

    If I manually add or remove places on a map page in a book using the + - functionality, the changes don't get permanently saved. Does anyone know why? iPhoto remembers them OK. If I add a photo to a map page by dragging it into a photo field, it reme

  • How can I get a passage highlighted in yellow in a word document sent to Adobe Reader?

    How can I get a passage highlighted in yellow in a word document sent to Adobe Reader?

  • Javascript onClick help

    I have two radio buttons with corresponding text boxes for input, when one is chosen I am disabling the text box for the other, is there a way to "gray out" the disabled text box using background-color or something? Any help is greatly appreciated, n

  • Ical crashes on opening

    iCal crashes within 1/2 second of opening --every time. Using new iMac dual core 17" desktop model. Using OS 10.4.latest (all Mac software is up to date) This is new computer. When I used Firewire app to transfer files from old G3 iMac many calendar

  • Udev Rules for Monitors

    So I've got a bit of a fluid monitor setup.  Three different screens with three different configurations that are switched among rather often.  I wrote a script using xrandr to handle this, and it works very well when it gets called.  I thought it wo