I am having a cs file where I want to call the function of js file.
Js File
Function foo(date){
//code
}
In a cs file, I want to call the foo function. Is it possible ? If yes, then how ?
If I want to insert just one alert then this is how I do it, but If I want to call a function, then I dont know the way.
To call just an inline javascript this works
Page.ClientScript.RegisterStartupScript(GetType(), "", "<script type='Text/JavaScript'> alert('Hello');</script>");
alertis calling a function. What are you trying to do exactly and what issue are you having?Page.ClientScript.RegisterStartupScript(GetType(), "", "foo()", true);, it shows "Page.ClientScript.RegisterStartupScript(GetType(),"","foo()",true);"