I want to add .js file along with ASP.NET my code is:
My .js file is:
I have add:
That code was showing error:
JScript1.js is udefined
please help me
Code:
Page.ClientScript.RegisterStartupScript(this.GetType(), "MyJavaScript",
"JScript1.js",true);
Button1.Attributes["onclick"] = "Alert()";
Code:
function Alert()
{
alert('good morning');
}
Code:
<head runat="server"> <script language="javascript" src="JScript1.js" type="text/javascript"></script> </head>
JScript1.js is udefined
please help me
Comment