I have doubt regarding call .cs class file(C#) function from javascript
My Code:
I have class file(.cs) like call_cs_function_from_js
------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace call_cs_function_from_js
{
public class cal_lcs_function_from_js
{
public void getdata()
{
}
}
}
This is javascript code File:
<script type="text/javascript">
function call(){
cal_lcs_function_from_js.getdata(); //This way is not working
alert('called');
}
</script>
Here I want call getdata of cal_lcs_function_from_js from call()(means .js). call() invoked when button click.
Please Show me what are the other ways.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…