jquery - Passing selected text of dropdownlist through json -
I want to receive the text of the selected option from the dropdown list in the Administrator method. But with the code below, I only get the text not replaced with the initial text.
Data. JasonOflog, which happens prior to the data connection. It gets submitted, the text changes, but this is not the text which the controller has.
In the Controller:
[http post] Public Jasonurstel Gudsaav (String Jacksonofflag) {<: See in:
& lt; script type = "text / javascript" & gt; $ (Function () {json = {jsonOfLog: $ ("# ddlDocumentType option: selected"). Text ()} $ ('# fileupload'). Fileupload ({dataType: 'json', Content Type: 'Application / Jason ; (URL: '/ Home / GoodSave'), Data: JSON.stringify (json), Add: Function (E, Data) {$ ('# fileuploadbutton'.) Click (function () {data .jsonOfLog = $ ("# DdlDocumentType Options: selected") .text (); data.Submit ();}}}});}); & Lt; / Script & gt;
<
Comments
Post a Comment