I am wondering is there any library or component that just generate JS script for the .NET code that are related to UI of a particular page. I guess, it sounds like a very bad explanation. Let me put an example,
If you have a code like below in your CS file,
DropDownList _ddl = this.Page.FindControl("DropDownList1");
_ddl.Visible = false;
Now the JS script can produced for the above .NET piece as like below,
var _ddl = document.getElementById("DropDownList1");
_ddl.style.display = 'none';
I am thinking of something that produces JS script by understanding .NET code that deals a page's UI part.
Is this possible thru Reflection?
Is there any library or any related work happening around there?