VMI,
since your Javascript function is client-side code, the only way you can
make a call to it from server-side code is to inject the call as client
script into the page. Here is an example:
if (fileEntries.Length <= 0)
{
Response.Write("<script>dirError();</script>");
}
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"VMI" wrote:
How can I call my javascript from within my C# "IF" statement?
I have a function called dirError() that only displays an alert:
function dirError()
{
alert('Bad directory');
}
From my C# code, I want to do this:
if (fileEntries.Length <= 0)
{
//CALL javaScript function dirError
}
Any help is appreciated.
Thanks.