How do I get to the value of a page custom field in the background of a Mvcsheet form page?

Source: Internet
Author: User

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?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.