ClientScript.RegisterStartupScript(Page.GetType(), "OnLoad", "outerSvg();", true);
function YouJsFunction(){ var test = '@ViewData["NAME"].ToString()'; } //Set the viewdata value befor returning view in the ActionResult Public ActionResult YourAction() { ViewData["NAME"]="Hello"; return View(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)