suganya pv

suganya pv

  • NA
  • 7
  • 0

call javascript function in asp.net,c#

Mar 27 2009 5:35 AM
Hi,
I have sample javascript function it have 2 parameter values. so how to access this script fuction in asp.net,c#.

Having javascript is:

<script language="javascript" type="text/javascript">
function splitLine(st,n)
{
var b = '';
var s = st;
while (s.length > n)
{
var c = s.substring(0,n);
var d = c.lastIndexOf(' ');
var e =c.lastIndexOf('\n');
if (e != -1) d = e;
if (d == -1) d = n;
b += c.substring(0,d) + '\n';
s = s.substring(d+1);
}
return b+s;
}
</script>

So how to use this script inside asp.net,c# and also how to pass values to this parameter.




Thanks.


Answers (2)