Just imagine scenario you have a user control on the page.
And that user control is trying to add JavaScript function MyFunction to the
page.
so it's using RegisterScript.....
Now if you have 2 same user controls on the page. both of them will try to
add MyFunction to the page... Which is sort of a mistake. You will duplicate
definition.
So the right way to do it will be check if that function already exists or
not. That why we have "key2". ASP.NET gives you way to check is that script
already been added to the page.
-----------------------------------
now what happens if two different controls starting using same name "key2".
The get all confused. So ASP.NET gives you Type parameter. So they will not
mix.
Sort of like namespace.
George.
"rodchar" <(E-Mail Removed)> wrote in message
news

E834DDE-A0CA-416A-9A0A-(E-Mail Removed)...
> hey all,
>
> can someone please explain in lamen's terms the following:
> ClientScript.RegisterStartupScript(this.GetType(), "key2", "javascript
> string", true);
> what does this.GetType() mean?
> what is the key2 parm used for?
>
> thanks,
> rodchar