Multiple ScriptControl instances sharing variable

fluolfsoibe

New Member
I have a \[code\]ScriptControl\[/code\] that uses an image as an embedded resource and \[code\]GetWebResourceUrl\[/code\] to generate the \[code\]WebResource.axd\[/code\] URL. I am currently using \[code\]GetScriptDescriptors()\[/code\] to send the URL to the JavaScript object.The \[code\]ScriptControl\[/code\] can be in a \[code\]Repeater\[/code\], so you may have 20+ instances. They all use the same images (not customizable through property), so I would like to set the URL once in a variable and share it. I know I could register a script block with a global variable, but would like to avoid that if possible. Is there a way to set a variable within the scope of the control type (global -> control type -> control instance)?
 
Back
Top