N
Nikki
Hi,
I would like to create a central storage place for javascript
functions that I can then access from any of my asp.net projects.
An example of what I need it for is as follows:
I have a class library that contains a function I use all the time (to
create a link around some text). That function in turn calls a
javascript function. Usually I would have put the javascript on the
page by using:
If (Not IsClientScriptBlockRegistered("clientScript")) Then
RegisterClientScriptBlock("clientScript", strJava)
End If
(where strJava = my javascript function etc)
Because IsClientScriptBlockRegistered is part of the Page class, I
can't do this in my class library.
The other option I thought of was including a javascript file as an
include on my .aspx page, but I would want the .js page to use in many
different projects, not just in one project.
Does anyone have any ideas as to what is the best way to store
reusuable javascript functions and how to access them?
Many thanks,
Nikki
I would like to create a central storage place for javascript
functions that I can then access from any of my asp.net projects.
An example of what I need it for is as follows:
I have a class library that contains a function I use all the time (to
create a link around some text). That function in turn calls a
javascript function. Usually I would have put the javascript on the
page by using:
If (Not IsClientScriptBlockRegistered("clientScript")) Then
RegisterClientScriptBlock("clientScript", strJava)
End If
(where strJava = my javascript function etc)
Because IsClientScriptBlockRegistered is part of the Page class, I
can't do this in my class library.
The other option I thought of was including a javascript file as an
include on my .aspx page, but I would want the .js page to use in many
different projects, not just in one project.
Does anyone have any ideas as to what is the best way to store
reusuable javascript functions and how to access them?
Many thanks,
Nikki