Problem:
<asp:hiddenfield id= "test" runat= "Server"/> in the foreground add such a hidden element, mvcsheet form page, how to get the value in the background, the direct use of test.value has been empty.
the foreground passes a series of judgment processing to write this value, need to obtain in the background, then processing data.
existing processes are on-line, do not want to add fields, and then publish process processing.
Is there any good way to deal with it?
Workaround :
1. You can first change the HiddenField control to a textbox to check if your JS has paid the value to the server control.
Note: when the foreground JS assigns a value to the server control, the ID is obtained by the <%= ID name. ClientID%>
2. May be loading the background method when the foreground JS has not given the parameter value up,
can be processed in a different mode, through the foreground JS Invoke Background method
Add custom toolbar button methods to trigger background events
$. Mvcsheet.addaction ({
Action: "Testaction",//Execute background method name
Icon: "Fa-print",//button icon
Text: "Background event",//button name
Datas: ["{Selectuser}"],//parameters, multiple parameters "{Param1}", "Param2" ...
Onaction:function () {
/*
The custom button execution event, if NULL, calls $. Mvcsheet.action performing a background method
if It is not NULL, then the method will be executed here, you need to post to the background or write the front-end logic
*/
//},
Onactiondone:function (e) {
Triggers when a background method call completes
The following is the output of the background value to the front-end control
if (e) {
$. Mvcsheetui.setcontrolvalue ("code", E.code);
$. Mvcsheetui.setcontrolvalue ("Mvcname", e.name);
}
},
Postsheetinfo:true//Whether the form data is submitted, if false, the data of the form is not returned
});
How do I get to the value of a page custom field in the background of a Mvcsheet form page?