I am fairly new to js and am having trouble when trying to call a js function from my codebehind.
C#:
protected void GridView3_OnSelectedIndexChanged(object sender, EventArgs e)
{
tbListOfCountries.Text = GridView3.SelectedRow.Cells[1].Text;
Page.ClientScript.RegisterStartupScript(this.GetType(), "test", "test()", true);
}
JavaScript:
function test() {
alert("test");
}
And the Unexpected Identifier error:
//<![CDATA[
test()Sys.Application.add_init(function() {
$create(Sys.Extended.UI.TabPanel, {"headerTab":$get("__tab_TabContainer1_TabPanel1"),"ownerID":"TabContainer1","wasLoadedOnce":true}, null, {"owner":"TabContainer1"}, $get("TabContainer1_TabPanel1"));
});
Any insights?