HOW TO CALL JAVASCRIPT FUCTION IN SERVER SIDE?

Vikas Giri

Total Post:13

Points:91
Posted by  Vikas Giri
 2401  View(s)
Ratings:
Rate this:
How to call javascript function in serverside in asp.net?
thanks
  1. Amit Singh

    Post:103

    Points:721
    Re: How to call javascript fuction in server side?

    Hi vikas,

    You can call server side  any javascript function in Asp.Net. Using RegisterStartupScript function as:

    Page.ClientScript.RegisterStartupScript(GetType(), "JavaScript", "javascript: showFunction();", true);
    where showFunction() is javascript function.
    and RegisterStartupScript is asp.net built in method.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!