-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
ScriptResourceAttribute.xml
324 lines (295 loc) · 25.2 KB
/
ScriptResourceAttribute.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
<Type Name="ScriptResourceAttribute" FullName="System.Web.UI.ScriptResourceAttribute">
<TypeSignature Language="C#" Value="public sealed class ScriptResourceAttribute : Attribute" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit ScriptResourceAttribute extends System.Attribute" />
<TypeSignature Language="DocId" Value="T:System.Web.UI.ScriptResourceAttribute" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class ScriptResourceAttribute
Inherits Attribute" />
<TypeSignature Language="F#" Value="type ScriptResourceAttribute = class
 inherit Attribute" />
<TypeSignature Language="C++ CLI" Value="public ref class ScriptResourceAttribute sealed : Attribute" />
<AssemblyInfo>
<AssemblyName>System.Web.Extensions</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Attribute</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.AttributeUsage(System.AttributeTargets.Assembly, AllowMultiple=true)]</AttributeName>
<AttributeName Language="F#">[<System.AttributeUsage(System.AttributeTargets.Assembly, AllowMultiple=true)>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Defines a resource in an assembly to be used from a client script file. This class cannot be inherited.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.ScriptResourceAttribute> class is valid only when you use it in assembly declarations. You use it to enable a specified embedded script resource in an assembly. You can define the name of the embedded script library, the name of the resource file for the script library, and the name that is used in a script file for retrieving the resource values. The <xref:System.Web.UI.ScriptManager> class uses the properties in <xref:System.Web.UI.ScriptResourceAttribute> to determine the correct resource name for a script library. The <xref:System.Web.UI.ScriptResourceAttribute.TypeName%2A> property is used with a resource key to specify a resource.
> [!NOTE]
> The <xref:System.Web.UI.ScriptResourceAttribute> class can be used only to identify text-based resources for JavaScript files. To associate a localized image (binary) file with a particular culture, consider storing only its URL as a localized resource, which then be resolved and loaded in script.
## Examples
The following example shows a <xref:System.Web.UI.ScriptResourceAttribute> attribute for a script file named CheckAnswer.js that uses resources from the VerificationResources resource files. The name `Answer` is used to reference these resources.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_Atlas/LocalizingClientResourcesWalkthrough/cs/AssemblyInfo.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Atlas/LocalizingClientResourcesWalkthrough/vb/AssemblyInfo.vb" id="Snippet3":::
The following example shows how to use the resources in client script. The resource keys (`Correct` and `Incorrect`) are prefixed with `Answer` to identify the script resource definition that contains the values.
:::code language="javascript" source="~/snippets/csharp/VS_Snippets_Atlas/LocalizingClientResourcesWalkthrough/cs/CheckAnswer.js" id="Snippet1":::
]]></format>
</remarks>
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System.Web.Extensions</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Web.UI.ScriptResourceAttribute" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ScriptResourceAttribute (string scriptName);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string scriptName) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.ScriptResourceAttribute.#ctor(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (scriptName As String)" />
<MemberSignature Language="F#" Value="new System.Web.UI.ScriptResourceAttribute : string -> System.Web.UI.ScriptResourceAttribute" Usage="new System.Web.UI.ScriptResourceAttribute scriptName" />
<MemberSignature Language="C++ CLI" Value="public:
 ScriptResourceAttribute(System::String ^ scriptName);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web.Extensions</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="scriptName" Type="System.String" Index="0" FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1" />
</Parameters>
<Docs>
<param name="scriptName">The name of the script library.</param>
<summary>Initializes a new instance of the <see cref="T:System.Web.UI.ScriptResourceAttribute" /> class.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ScriptResourceAttribute (string scriptName, string scriptResourceName, string typeName);" FrameworkAlternate="netframework-3.5" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string scriptName, string scriptResourceName, string typeName) cil managed" FrameworkAlternate="netframework-3.5" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.ScriptResourceAttribute.#ctor(System.String,System.String,System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (scriptName As String, scriptResourceName As String, typeName As String)" FrameworkAlternate="netframework-3.5" />
<MemberSignature Language="F#" Value="new System.Web.UI.ScriptResourceAttribute : string * string * string -> System.Web.UI.ScriptResourceAttribute" Usage="new System.Web.UI.ScriptResourceAttribute (scriptName, scriptResourceName, typeName)" FrameworkAlternate="netframework-3.5" />
<MemberSignature Language="C++ CLI" Value="public:
 ScriptResourceAttribute(System::String ^ scriptName, System::String ^ scriptResourceName, System::String ^ typeName);" FrameworkAlternate="netframework-3.5" />
<MemberSignature Language="C#" Value="public ScriptResourceAttribute (string scriptName, string stringResourceName, string stringResourceClientTypeName);" FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string scriptName, string stringResourceName, string stringResourceClientTypeName) cil managed" FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1" />
<MemberSignature Language="VB.NET" Value="Public Sub New (scriptName As String, stringResourceName As String, stringResourceClientTypeName As String)" FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1" />
<MemberSignature Language="F#" Value="new System.Web.UI.ScriptResourceAttribute : string * string * string -> System.Web.UI.ScriptResourceAttribute" Usage="new System.Web.UI.ScriptResourceAttribute (scriptName, stringResourceName, stringResourceClientTypeName)" FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1" />
<MemberSignature Language="C++ CLI" Value="public:
 ScriptResourceAttribute(System::String ^ scriptName, System::String ^ stringResourceName, System::String ^ stringResourceClientTypeName);" FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web.Extensions</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="scriptName" Type="System.String" Index="0" />
<Parameter Name="scriptResourceName" Type="System.String" Index="1" FrameworkAlternate="netframework-3.5" />
<Parameter Name="stringResourceName" Type="System.String" Index="1" FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1" />
<Parameter Name="typeName" Type="System.String" Index="2" FrameworkAlternate="netframework-3.5" />
<Parameter Name="stringResourceClientTypeName" Type="System.String" Index="2" FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1" />
</Parameters>
<Docs>
<param name="scriptName">The name of the script library.</param>
<param name="scriptResourceName">The name of the resource file for the script library.</param>
<param name="stringResourceName">The name of the resource file for the script library.</param>
<param name="typeName">The name of the type to create for the values in the resource file.</param>
<param name="stringResourceClientTypeName">The name of the type to create for the values in the resource file.</param>
<summary>Initializes a new instance of the <see cref="T:System.Web.UI.ScriptResourceAttribute" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.ScriptResourceAttribute.%23ctor%2A> method is typically called by using the <xref:System.Web.UI.ScriptResourceAttribute> attribute as an assembly attribute in the application's AssemblyInfo file.
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">
<paramref name="scriptName" />, <paramref name="scriptResourceName" />, or <paramref name="typeName" /> is <see langword="null" /> or an empty string ("").</exception>
</Docs>
</Member>
<Member MemberName="ScriptName">
<MemberSignature Language="C#" Value="public string ScriptName { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string ScriptName" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.ScriptResourceAttribute.ScriptName" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property ScriptName As String" />
<MemberSignature Language="F#" Value="member this.ScriptName : string" Usage="System.Web.UI.ScriptResourceAttribute.ScriptName" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ ScriptName { System::String ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web.Extensions</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the name of the script library.</summary>
<value>The name of the script library.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example shows a <xref:System.Web.UI.ScriptResourceAttribute> attribute for a script file named CheckAnswer.js that uses resources from the VerificationResources resource files. The name `Answer` is used to reference these resources. In this example, the <xref:System.Web.UI.ScriptResourceAttribute.ScriptName%2A> property returns "LocalizingResources.CheckAnswer.js".
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_Atlas/LocalizingClientResourcesWalkthrough/cs/AssemblyInfo.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Atlas/LocalizingClientResourcesWalkthrough/vb/AssemblyInfo.vb" id="Snippet3":::
The following example shows how to use the resources in client script. The resource keys (`Correct` and `Incorrect`) are prefixed with `Answer` to identify the script resource definition that contains the values.
:::code language="javascript" source="~/snippets/csharp/VS_Snippets_Atlas/LocalizingClientResourcesWalkthrough/cs/CheckAnswer.js" id="Snippet1":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ScriptResourceName">
<MemberSignature Language="C#" Value="public string ScriptResourceName { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string ScriptResourceName" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.ScriptResourceAttribute.ScriptResourceName" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property ScriptResourceName As String" />
<MemberSignature Language="F#" Value="member this.ScriptResourceName : string" Usage="System.Web.UI.ScriptResourceAttribute.ScriptResourceName" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ ScriptResourceName { System::String ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web.Extensions</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.Obsolete("This property is obsolete. Use StringResourceName instead.")]</AttributeName>
<AttributeName Language="F#">[<System.Obsolete("This property is obsolete. Use StringResourceName instead.")>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the name of the resource file for the script library.</summary>
<value>The name of the resource file for the script library.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example shows a <xref:System.Web.UI.ScriptResourceAttribute> attribute for a script file named CheckAnswer.js that uses resources from the VerificationResources resource files. The name `Answer` is used to reference these resources. In this example, the <xref:System.Web.UI.ScriptResourceAttribute.ScriptResourceName%2A> property returns "LocalizingResources.VerificationResources". The file name extension is not included when you define the <xref:System.Web.UI.ScriptResourceAttribute.ScriptResourceName%2A>.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_Atlas/LocalizingClientResourcesWalkthrough/cs/AssemblyInfo.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Atlas/LocalizingClientResourcesWalkthrough/vb/AssemblyInfo.vb" id="Snippet3":::
The following example shows how to use the resources in client script. The resource keys (`Correct` and `Incorrect`) are prefixed with `Answer` to identify the script resource definition that contains the values.
:::code language="javascript" source="~/snippets/csharp/VS_Snippets_Atlas/LocalizingClientResourcesWalkthrough/cs/CheckAnswer.js" id="Snippet1":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="StringResourceClientTypeName">
<MemberSignature Language="C#" Value="public string StringResourceClientTypeName { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string StringResourceClientTypeName" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.ScriptResourceAttribute.StringResourceClientTypeName" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property StringResourceClientTypeName As String" />
<MemberSignature Language="F#" Value="member this.StringResourceClientTypeName : string" Usage="System.Web.UI.ScriptResourceAttribute.StringResourceClientTypeName" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ StringResourceClientTypeName { System::String ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web.Extensions</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the name of the client type to create for the values in the resource file.</summary>
<value>The name of the client type.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="StringResourceName">
<MemberSignature Language="C#" Value="public string StringResourceName { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string StringResourceName" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.ScriptResourceAttribute.StringResourceName" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property StringResourceName As String" />
<MemberSignature Language="F#" Value="member this.StringResourceName : string" Usage="System.Web.UI.ScriptResourceAttribute.StringResourceName" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ StringResourceName { System::String ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web.Extensions</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the name of the resource file for the script library.</summary>
<value>The name of the resource file.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="TypeName">
<MemberSignature Language="C#" Value="public string TypeName { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string TypeName" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.ScriptResourceAttribute.TypeName" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property TypeName As String" />
<MemberSignature Language="F#" Value="member this.TypeName : string" Usage="System.Web.UI.ScriptResourceAttribute.TypeName" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ TypeName { System::String ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web.Extensions</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.Obsolete("This property is obsolete. Use StringResourceClientTypeName instead.")]</AttributeName>
<AttributeName Language="F#">[<System.Obsolete("This property is obsolete. Use StringResourceClientTypeName instead.")>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the name that is used when retrieving the values in the resource file.</summary>
<value>The name that is used in client script when retrieving the values in the resource file.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.ScriptResourceAttribute.TypeName%2A> property contains the value that is used for retrieving localized resources in client script. The client script must include the <xref:System.Web.UI.ScriptResourceAttribute.TypeName%2A> value and the key name for the resource to be localized.
## Examples
The following example shows a <xref:System.Web.UI.ScriptResourceAttribute> attribute for a script file named CheckAnswer.js that uses resources from the VerificationResources resource files. The name `Answer` is used to reference these resources. In this example, the <xref:System.Web.UI.ScriptResourceAttribute.TypeName%2A> property returns "Answer".
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_Atlas/LocalizingClientResourcesWalkthrough/cs/AssemblyInfo.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Atlas/LocalizingClientResourcesWalkthrough/vb/AssemblyInfo.vb" id="Snippet3":::
The following example shows how to use the resources in client script. The resource keys (`Correct` and `Incorrect`) are prefixed with `Answer` to identify the script resource definition that contains the values.
:::code language="javascript" source="~/snippets/csharp/VS_Snippets_Atlas/LocalizingClientResourcesWalkthrough/cs/CheckAnswer.js" id="Snippet1":::
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>