Ok, I now see where I made one mistake. I did a search on
RegisterClientScriptBlock and found that it is a method on the Page class
(although, it does not appear in intellisense). I modified my code to use
the RegisterClientScriptBlock method in conjunction to the
IsClientScriptBlockRegistered method, but multiple blocks are still being
written to the page.
I'm using a constant as the key (ex: "MyClientScript").
"Jason Barnett" wrote:
> I'm not using the RegisterClientScriptBlock method. From what I've read,
> that is a method on the ClientScriptManager class and is only available in
> .NET 2 or higher. Is there something comparable in .NET 1.1?
>
> I'm currently writing the script as plain text using output.Write method
> within the Render method.
>
>
> "Nathan Sokalski" wrote:
>
> > In the RegisterClientScriptBlock method, what are you using as the key (the
> > first parameter)?
> > --
> > Nathan Sokalski
> >
> > http://www.nathansokalski.com/
> >
> > "Jason Barnett" <> wrote in message
> > news
3A4D19E-B099-4162-86D6-...
> > > I'm using .NET 1.1 and I've created a server control that writes
> > > javascript
> > > to the output writer. The control works great, except when I add
> > > additional
> > > controls. The problem is that each control writes the same javascript
> > > block,
> > > which causes a stack overflow when it is executed.
> > >
> > > Could someone tell me how I may write the javascript to the page only
> > > once,
> > > regardless of how many controls are dropped on the web form?
> >
> >
> >