onServerClick when javascript disabled

button, html, javascript, server-side

Solution

The `__doPostBack()` method is responsible for raising a click event to the server in the background. With JavaScript disabled there's no way that's going to happen.

Here's one of the many articles that explains how this works. And a related question here which gives a glimpse into what code is generated behind the scenes.

Problem

I'm trying to get an html button to call a server-side method like this: ``` <button onserverclick="onClick" runat="server">Submit</button> ``` However, this call is not being made when the browser's javascript is disabled. I am confused because my understanding is that this call has no interaction with javascript.

Original source

Related problems