TIA
John O'Connell
For more:
ms-help://MS.VSCC/MS.MSDNVS/cpref/html/frlrfSystemWebUIPageClassRegisterClie
ntScriptBlockTopic.htm
Ken
MVP [ASP.NET]
"John O'Connell" <ltj__...@hotmail.com> wrote in message
news:uEL1cs4oBHA.2448@tkmsftngp04...
"John O'Connell" <ltj__...@hotmail.com> wrote in message
news:uEL1cs4oBHA.2448@tkmsftngp04...
"Ken Cox [Microsoft MVP]" <BANSPAM...@sympatico.ca> wrote in message
news:O#OMsA5oBHA.1596@tkmsftngp07...
private void Page_Load(object sender, System.EventArgs e)
{
Page.RegisterClientScriptBlock("mykey", "alert(\"hi\")");
}
It didn't work - no script was emitted in the generated web page. I've also
tried a literal <script> tag but no joy. Any ideas? Or is this NYI in Beta
2?
John
"Ken Cox [Microsoft MVP]" <BANSPAM...@sympatico.ca> wrote in message
news:O#OMsA5oBHA.1596@tkmsftngp07...
Page.RegisterClientScriptBlock("mykey", "<script>alert(\"hi\")</script>");
Ken
MVP [ASP.NET]
"John O'Connell" <ltj__...@hotmail.com> wrote in message
news:O1Bff2SpBHA.2232@tkmsftngp02...
John
"Ken Cox [Microsoft MVP]" <BANSPAM...@sympatico.ca> wrote in message
news:#YiAzaAqBHA.2212@tkmsftngp04...
Anyway, here's the content of my startup.aspx.cs file.
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace p450_cs_work
{
/// <summary>
/// Summary description for startup.
/// </summary>
public class startup : System.Web.UI.Page
{
private void Page_Load(object sender, System.EventArgs e)
{
Page.RegisterClientScriptBlock("mykey",
"<script>alert(\"hi\")</script>");
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}
}
"John O'Connell" <ltj__...@hotmail.com> wrote in message
news:#BfY2nEqBHA.2540@tkmsftngp04...
Ken
"John O'Connell" <ltj__...@hotmail.com> wrote in message
news:#BfY2nEqBHA.2540@tkmsftngp04...
John
"Ken Cox [Microsoft MVP]" <BANSPAM...@sympatico.ca> wrote in message
news:#jsomWFqBHA.2332@tkmsftngp03...