S
shapper
Hello,
I used the following:
Page.ClientScript.RegisterClientScriptInclude(Me.GetType(),
"Wait", "~/App_Scripts/Wait.js")
Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "Hello",
"Alert('Hello World');", True)
On Page_Load (also tried Page_Init and Page_Prerender)
In both cases the reference and the script were placed inside the
<body> tag?
Shouldn't it be in the <head> tag?
How can I solve this?
My rendered HTML code:
<head>
<title>
Default
</title>
</head>
<body>
<form name="form1" method="post" action="Default.aspx" id="form1">
<div>
<input name="__VIEWSTATE" id="__VIEWSTATE" value="/
wEPDwUJMTk5MjU0MTcwZGTUsWGyZF9Fo8xcBZKocDiHxhClIA==" type="hidden">
</div>
<script src="%7E/App_Scripts/JQuery.js" type="text/javascript">
</script>
<script type="text/javascript">
//<![CDATA[
alert('Hello World)'$(document).ready(function(){
$('#tableone').tableHover();
});
//]]>
</script>
</form>
</body>
Thanks,
Miguel
I used the following:
Page.ClientScript.RegisterClientScriptInclude(Me.GetType(),
"Wait", "~/App_Scripts/Wait.js")
Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "Hello",
"Alert('Hello World');", True)
On Page_Load (also tried Page_Init and Page_Prerender)
In both cases the reference and the script were placed inside the
<body> tag?
Shouldn't it be in the <head> tag?
How can I solve this?
My rendered HTML code:
<head>
<title>
Default
</title>
</head>
<body>
<form name="form1" method="post" action="Default.aspx" id="form1">
<div>
<input name="__VIEWSTATE" id="__VIEWSTATE" value="/
wEPDwUJMTk5MjU0MTcwZGTUsWGyZF9Fo8xcBZKocDiHxhClIA==" type="hidden">
</div>
<script src="%7E/App_Scripts/JQuery.js" type="text/javascript">
</script>
<script type="text/javascript">
//<![CDATA[
alert('Hello World)'$(document).ready(function(){
$('#tableone').tableHover();
});
//]]>
</script>
</form>
</body>
Thanks,
Miguel