2 implementations of ViewData
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
HtmlHelper.cs (1)
113
public ViewDataDictionary
ViewData
=> ViewContext.ViewData;
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
DefaultEditorTemplatesTest.cs (1)
1389
public ViewDataDictionary
ViewData
114 references to ViewData
Microsoft.AspNetCore.Mvc.ViewFeatures (104)
DefaultDisplayTemplates.cs (27)
21
if (htmlHelper.
ViewData
.Model != null)
23
value = Convert.ToBoolean(htmlHelper.
ViewData
.Model, CultureInfo.InvariantCulture);
26
return htmlHelper.
ViewData
.ModelMetadata.IsNullableValueType ?
74
var model = htmlHelper.
ViewData
.Model;
88
var elementMetadata = htmlHelper.
ViewData
.ModelMetadata.ElementMetadata;
101
var oldPrefix = htmlHelper.
ViewData
.TemplateInfo.HtmlFieldPrefix;
104
htmlHelper.
ViewData
.TemplateInfo.HtmlFieldPrefix = string.Empty;
122
container: htmlHelper.
ViewData
.ModelExplorer,
131
htmlHelper.
ViewData
,
144
htmlHelper.
ViewData
.TemplateInfo.HtmlFieldPrefix = oldPrefix;
150
if (htmlHelper.
ViewData
.TemplateInfo.FormattedModelValue == htmlHelper.
ViewData
.Model)
152
htmlHelper.
ViewData
.TemplateInfo.FormattedModelValue =
153
string.Format(CultureInfo.CurrentCulture, "{0:0.00}", htmlHelper.
ViewData
.Model);
161
var uriString = "mailto:" + ((htmlHelper.
ViewData
.Model == null) ?
163
htmlHelper.
ViewData
.Model.ToString());
164
var linkedText = (htmlHelper.
ViewData
.TemplateInfo.FormattedModelValue == null) ?
166
htmlHelper.
ViewData
.TemplateInfo.FormattedModelValue.ToString();
173
if (htmlHelper.
ViewData
.ModelMetadata.HideSurroundingHtml)
183
return new HtmlString(htmlHelper.
ViewData
.TemplateInfo.FormattedModelValue.ToString());
188
var viewData = htmlHelper.
ViewData
;
225
htmlHelper.
ViewData
,
268
var value = htmlHelper.
ViewData
.TemplateInfo.FormattedModelValue;
279
var uriString = (htmlHelper.
ViewData
.Model == null) ? string.Empty : htmlHelper.
ViewData
.Model.ToString();
280
var linkedText = (htmlHelper.
ViewData
.TemplateInfo.FormattedModelValue == null) ?
282
htmlHelper.
ViewData
.TemplateInfo.FormattedModelValue.ToString();
DefaultEditorTemplates.cs (22)
26
if (htmlHelper.
ViewData
.Model != null)
28
value = Convert.ToBoolean(htmlHelper.
ViewData
.Model, CultureInfo.InvariantCulture);
31
return htmlHelper.
ViewData
.ModelMetadata.IsNullableValueType ?
55
var viewData = htmlHelper.
ViewData
;
70
var elementMetadata = htmlHelper.
ViewData
.ModelMetadata.ElementMetadata;
104
container: htmlHelper.
ViewData
.ModelExplorer,
113
htmlHelper.
ViewData
,
132
if (htmlHelper.
ViewData
.TemplateInfo.FormattedModelValue == htmlHelper.
ViewData
.Model)
134
htmlHelper.
ViewData
.TemplateInfo.FormattedModelValue =
135
string.Format(CultureInfo.CurrentCulture, "{0:0.00}", htmlHelper.
ViewData
.Model);
143
var viewData = htmlHelper.
ViewData
;
173
var htmlAttributesObject = htmlHelper.
ViewData
[HtmlAttributeKey];
230
var viewData = htmlHelper.
ViewData
;
267
htmlHelper.
ViewData
,
317
value = htmlHelper.
ViewData
.TemplateInfo.FormattedModelValue;
411
return GenerateTextBox(htmlHelper, htmlHelper.
ViewData
.TemplateInfo.FormattedModelValue, htmlAttributes);
421
var metadata = htmlHelper.
ViewData
.ModelMetadata;
422
var value = htmlHelper.
ViewData
.Model;
423
if (htmlHelper.
ViewData
.TemplateInfo.FormattedModelValue != value && metadata.HasNonDefaultEditFormat)
430
htmlHelper.
ViewData
.TemplateInfo.FormattedModelValue =
437
return GenerateTextBox(htmlHelper, inputType, htmlHelper.
ViewData
.TemplateInfo.FormattedModelValue);
Rendering\HtmlHelperInputExtensions.cs (16)
19
/// the <see cref="IHtmlHelper.
ViewData
"/> entry with full name, or
44
/// the <see cref="IHtmlHelper.
ViewData
"/> entry with full name, or
73
/// the <see cref="IHtmlHelper.
ViewData
"/> entry with full name, or
130
/// the <see cref="IHtmlHelper.
ViewData
"/> entry with full name, or
154
/// the <see cref="IHtmlHelper.
ViewData
"/> entry with full name, or
277
/// the <see cref="IHtmlHelper.
ViewData
"/> entry with full name, or
309
/// the <see cref="IHtmlHelper.
ViewData
"/> entry with full name, or
349
/// the <see cref="IHtmlHelper.
ViewData
"/> entry with full name, or
417
/// the <see cref="IHtmlHelper.
ViewData
"/> entry with full name, or
441
/// the <see cref="IHtmlHelper.
ViewData
"/> entry with full name, or
469
/// the <see cref="IHtmlHelper.
ViewData
"/> entry with full name, or
502
/// the <see cref="IHtmlHelper.
ViewData
"/> entry with full name,
629
/// the <see cref="IHtmlHelper.
ViewData
"/> entry with full name, or
654
/// the <see cref="IHtmlHelper.
ViewData
"/> entry with full name, or
686
/// the <see cref="IHtmlHelper.
ViewData
"/> entry with full name, or
714
/// the <see cref="IHtmlHelper.
ViewData
"/> entry with full name, or
Rendering\HtmlHelperPartialExtensions.cs (8)
32
return htmlHelper.PartialAsync(partialViewName, htmlHelper.
ViewData
.Model, viewData: null);
55
return htmlHelper.PartialAsync(partialViewName, htmlHelper.
ViewData
.Model, viewData);
97
return Partial(htmlHelper, partialViewName, htmlHelper.
ViewData
.Model, viewData: null);
120
return Partial(htmlHelper, partialViewName, htmlHelper.
ViewData
.Model, viewData);
184
RenderPartial(htmlHelper, partialViewName, htmlHelper.
ViewData
.Model, viewData: null);
203
RenderPartial(htmlHelper, partialViewName, htmlHelper.
ViewData
.Model, viewData);
265
return htmlHelper.RenderPartialAsync(partialViewName, htmlHelper.
ViewData
.Model, viewData: null);
288
return htmlHelper.RenderPartialAsync(partialViewName, htmlHelper.
ViewData
.Model, viewData);
Rendering\HtmlHelperSelectExtensions.cs (18)
16
/// <option> elements based on the <see cref="IHtmlHelper.
ViewData
"/> entry with full name. Adds a
33
/// The <see cref="IHtmlHelper.
ViewData
"/> entry with full name must be a non-<c>null</c> collection of
46
/// <option> elements based on <paramref name="optionLabel"/> and the <see cref="IHtmlHelper.
ViewData
"/>
67
/// The <see cref="IHtmlHelper.
ViewData
"/> entry with full name must be a non-<c>null</c> collection of
91
/// the <see cref="IHtmlHelper.
ViewData
"/> entry with full name (unless used instead of
100
/// <optgroup> and <option> elements. If <c>null</c>, uses the <see cref="IHtmlHelper.
ViewData
"/>
125
/// the <see cref="IHtmlHelper.
ViewData
"/> entry with full name (unless used instead of
134
/// <optgroup> and <option> elements. If <c>null</c>, uses the <see cref="IHtmlHelper.
ViewData
"/>
164
/// the <see cref="IHtmlHelper.
ViewData
"/> entry with full name (unless used instead of
173
/// <optgroup> and <option> elements. If <c>null</c>, uses the <see cref="IHtmlHelper.
ViewData
"/>
209
/// <optgroup> and <option> elements. If <c>null</c>, uses the <see cref="IHtmlHelper.
ViewData
"/>
244
/// <optgroup> and <option> elements. If <c>null</c>, uses the <see cref="IHtmlHelper.
ViewData
"/>
288
/// <optgroup> and <option> elements. If <c>null</c>, uses the <see cref="IHtmlHelper.
ViewData
"/>
316
/// <option> elements based on the <see cref="IHtmlHelper.
ViewData
"/> entry with full name. Adds a
333
/// The <see cref="IHtmlHelper.
ViewData
"/> entry with full name must be a non-<c>null</c> collection of
350
/// the <see cref="IHtmlHelper.
ViewData
"/> entry with full name (unless used instead of
359
/// <optgroup> and <option> elements. If <c>null</c>, uses the <see cref="IHtmlHelper.
ViewData
"/>
391
/// <optgroup> and <option> elements. If <c>null</c>, uses the <see cref="IHtmlHelper.
ViewData
"/>
Rendering\HtmlHelperValueExtensions.cs (3)
17
/// the <see cref="IHtmlHelper.
ViewData
"/> entry with full name, or
63
/// the <see cref="IHtmlHelper.
ViewData
"/> entry with full name, or
83
/// the <see cref="IHtmlHelper.
ViewData
"/> entry with full name, or
Rendering\IHtmlHelper.cs (10)
173
/// the <see cref="
ViewData
"/> entry with full name, or
257
/// the <see cref="
ViewData
"/> entry with full name (unless used instead of <paramref name="selectList"/>), or
264
/// <optgroup> and <option> elements. If <c>null</c>, uses the <see cref="
ViewData
"/> entry with
404
/// the <see cref="
ViewData
"/> entry with full name,
448
/// the <see cref="
ViewData
"/> entry with full name (unless used instead of <paramref name="selectList"/>), or
456
/// collection with name <paramref name="expression"/> in <see cref="
ViewData
"/>.
522
/// the <see cref="
ViewData
"/> entry with full name, or
615
/// the <see cref="
ViewData
"/> entry with full name, or
640
/// the <see cref="
ViewData
"/> entry with full name,
719
/// the <see cref="
ViewData
"/> entry with full name, or
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (10)
DefaultEditorTemplatesTest.cs (2)
257
helperMock.SetupGet(h => h.
ViewData
).Returns(helperToCopy.ViewData);
1391
get { return _innerHelper.
ViewData
; }
Rendering\HtmlHelperPartialExtensionsTest.cs (8)
46
.SetupGet(h => h.
ViewData
)
81
helper.SetupGet(h => h.
ViewData
)
120
.SetupGet(h => h.
ViewData
)
172
helper.SetupGet(h => h.
ViewData
)
195
.SetupGet(h => h.
ViewData
)
243
.SetupGet(h => h.
ViewData
)
274
helper.SetupGet(h => h.
ViewData
)
319
helper.SetupGet(h => h.
ViewData
)