Use of Ajax.beginform

Source: Internet
Author: User

@using (Ajax.beginform ("Addhomerule", "MyHome", New ajaxoptions
{
HttpMethod = "Post",//Get or Set HTTP request method
Confirm = "OK commit",//Gets or sets the message that is displayed in the confirmation window before the request is submitted
Insertionmode = insertionmode.replace,//insertionmode.insertafter: Insert after element insertionmode.insertbefore before element; Nsertionmode.replace replacing elements
Loadingelementduration = 2000,//Indicates the duration of the animation when an element is loaded or hidden
Loadingelementid = "Loaddingid",//The id attribute of the HTML element to display when the AJAX function is loaded
Onbegin = "Begin",//JavaScript function name that is called immediately before the page is updated
OnComplete = "",//the JavaScript function name to invoke after the corresponding data is instantiated but before the page is updated
OnFailure = "Ajaxerror", the name of the JavaScript function to invoke when the//string type fails on a page call
Updatetargetid = "Rulesubmit",//Gets or sets the ID of the DOM element that is updated with the service response
onsuccess = "Success",//The name of the JavaScript function to invoke after the page is successfully updated
url = ""//Gets or sets the URL to send the request to
}))
{
<div class= "Form-group" >
<label for= "" class= "Control-label" > Rules:</label>
<textarea id= "Txtrule" name= "Hrl_ruleinfo" rows= "5" cols= "" "class=" Form-control "placeholder=" please write the love rules to be specified "> </textarea>
</div>
<div class= "Form-group" >
<label for= "" class= "Control-label" > Punishment:</label>
<textarea id= "Txtpunishe" name= "Hpl_punishmentinfo" rows= "ten" cols= "" class= "Form-control" placeholder= "please write the offending rule , the punishment to be accepted "></textarea>
</div>
<div class= "Form-group" >
<input type= "Submit" value= "OK"/>
</div>
}

Use of Ajax.beginform

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.