Javascript Postback


InterServer Web Hosting and VPS
Sony Playstation PS4 Pro Custom Build NVMe SSD Drive - Enclosure case and Crucial NVMe SSD
PS4 Pro Custom External SSD NVMe Drive

How I built a PS4 Pro Custom External SSD NVMe Drive...

NUC8i7BEH with memory
Intel NUC8I7BEH Review and Custom Build

This is my review of the Intel NUC8i7BEH and a summary of my build...

Card image cap
Asus M5A88-M EVO Review

This is my review of the Asus M5A88-M EVO motherboard...

Corsair Vengeance Blue 8GB (2x4GB) DDR3 PC3-12800C9 1600MHz Dual Channel Kit
Corsair Vengeance Blue Review

This is my review of the Corsair Vengeance Blue 8GB (2x4GB) DDR3 PC3-12800C9 1600MHz Dual Channel Kit memory...

Robotic Arm with USB PC Interface Review
Robotic Arm with USB PC Interface Review

This is my review of the Robotic Arm with USB PC Interface...

Javascript Postback | Submit Form | Submit Page

Here we look at how to perform a Javascript Postback / submit the form / submit the page.

Although ASP.NET usually handles doing a postback (submitting the page/form) automatically for us, there can be times when we would like to initiate a postback ouurselves using Javascript code running on the client's browser. For instance you may be runnning a Javascript function which performs some logic, and at some point you to post back to the server so your C# can continue the processing.

Here is some Javascript code which will perform a postback of the form.


// submits form/causes postback
document.forms[0].submit();

This will cause a postback to the server.

Sponsored Links
SolarSystem - AngularJS Demo
SolarSystem - Angular JS Demo

Check out my first Angular JS demo hosted in Azure, it helped win my first Angular contract. Put the sound on.