VMI,
This is assuming you are running in ASP.NET. You can't call the
javascript function. Rather, you need to inject the javascript code into
the page returned.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
(E-Mail Removed)
"VMI" <(E-Mail Removed)> wrote in message
news:06AD391D-CA0A-4C12-B0AE-(E-Mail Removed)...
> 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.