1
Reply

How to dynamically register and invoke javascript from C#?

Vithal Wadje

Vithal Wadje

Oct 17, 2012
1.4k
0

    . Use the method ClientScript.RegisterClientScriptBlock. Note that there was an older method too called as
    Page.RegisterClientScriptBlock, but now this is deprecated.
    Example (C#):
    ClientScript.RegisterClientScriptBlock(typeof(Page), "theScript", "alert('Cracking interviews is now a cakewalk')", true);

    Vithal Wadje
    October 17, 2012
    0