Saturday, March 24, 2012

Call AJAX method from code behind page

Hi,I need to call an AJAX method from code behind page; is there any way to do that? if it can be done by calling a javascript function from code behind page, also helpsI'm coding in ASP C# .NETAny idea is appreciated

this code solved my problem:
string s = "<script type='text/javascript'>test();</script>";

ClientScript.RegisterStartupScript(Page.GetType(), "test", s);

while I have such function in my javascript code:

function test()
{
..
}

No comments:

Post a Comment