JavaScript Object Model (Server method cannot be called from JavaScript), whenever the Window is an TDI Window

Answered Closed

Hello Wisej Team,

I have been working on the calling a method in my C# Server from JavaScript Client whenever keypress event is fire.

However, I am working on the TDI interface, and it seems like I cannot call the server method from the client when I have documented in TDI mode.

I have tested with the Non-TDI interface, and the method is called when the window is configured as the Non-TDI window.

I have followed this document to perform my task:


  • You must to post comments
Best Answer

Thank you Luca for your reply.
I tried with your suggested answer but for some reason, it was not working.

Nevertheless, I found the workaround, and in that, you don’t explicitly need to override the method OnWebRender.

It seems like, if you call the method with an absolute path, you can trigger the method. I use this calling to access method declared in Child Control Class (MDI Child):


  • You must to post comments

If you mean an MdiChild form, they don’t automatically exposes web methods because they are not top level containers. See at the bottom of the help the note marked “Important”, it also explains how you can expose web methods on any control.

 protected override void OnWebRender(dynamic config)
     config.webMethods = new[] { "method1", "methdod2" };


  • You must to post comments
Showing 2 results