1. Javascript Function execution C # CodeFunctions in:
Method 1:
1Create a button to write the called or processed content in the backgroundButton_clickMedium;
2WriteJSFunction. The content isDocument. getelementbyid ("btn1"). Click ();
3, Called at the front end or back endJSFunction, ExcitationClickEvent, equivalent to accessing the backgroundC #Function;
2. How Javascript Access C # Variable ?
The answer is as follows:
Method 1:
1Hide domain access on the page
Method 2:
1,As defined in the backgroundPublic String N;
2,Front-endJSTo reference the variable in the format''<%=N%>''Or"+<%=N%>+"
3. How C # Medium Access Javascript Existing variable ?
The answer is as follows:
Method 1:
1, The foreground uses static text control to hide the domainJSWrite the variable value into it;
2For background useRequest ["ID"]To obtain the value;
Method 2:
AvailableCookieOrSession
4. How C # Medium Access Javascript Function ?
The answer is as follows:
C #Code ExecutionJavascriptFunction:
Method 1:
1,Page. registerstartupscript ("ggg ","");
ArticleFrom:Http://aspnetbus.blogbus.com/logs/65718157.html