Beispiel #1
0
 /// <summary>
 /// Returns a radio button input element for each property in the object that is represented by the specified expression, using the specified HTML attributes.
 /// </summary>
 ///
 /// <returns>
 /// An HTML input element whose type attribute is set to "radio" for each property in the object that is represented by the specified expression, using the specified HTML attributes.
 /// </returns>
 /// <param name="formGroup">The IFormGroup instance that this method extends.</param>
 /// <param name="expression">An expression that identifies the object that contains the properties to render.</param>
 /// <param name="value">The value of the selected radio button. The value is retrieved in this order - the <see cref="T:System.Web.Mvc.ModelStateDictionary"/> object, the value of this parameter, the <see cref="T:System.Web.Mvc.ViewDataDictionary"/> object, and lastly, a value attribute in the html attributes.</param>
 /// <param name="htmlAttributes">An object that contains the HTML attributes to set for the element.</param>
 /// <typeparam name="TModel">The type of the model.</typeparam>
 /// <typeparam name="TProperty">The type of the value.</typeparam>
 public static YimaFormRadioButton <TModel, TProperty> YimaRadioButtonFor <TModel, TProperty>(this IFormGroup <TModel> formGroup, Expression <Func <TModel, TProperty> > expression, object value, object htmlAttributes)
 {
     return(formGroup.YimaRadioButtonFor <TModel, TProperty>(expression, value, (IDictionary <string, object>)HtmlHelper.AnonymousObjectToHtmlAttributes(htmlAttributes)));
 }
Beispiel #2
0
 /// <summary>
 /// Returns a radio button input element for each property in the object that is represented by the specified expression.
 /// </summary>
 ///
 /// <returns>
 /// An HTML input element whose type attribute is set to "radio" for each property in the object that is represented by the specified expression.
 /// </returns>
 /// <param name="formGroup">The IFormGroup instance that this method extends.</param>
 /// <param name="expression">An expression that identifies the object that contains the properties to render.</param>
 /// <param name="value">The value of the selected radio button. The value is retrieved in this order - the <see cref="T:System.Web.Mvc.ModelStateDictionary"/> object, the value of this parameter, the <see cref="T:System.Web.Mvc.ViewDataDictionary"/> object, and lastly, a value attribute in the html attributes.</param>
 /// <typeparam name="TModel">The type of the model.</typeparam>
 /// <typeparam name="TProperty">The type of the value.</typeparam>
 public static YimaFormRadioButton <TModel, TProperty> YimaRadioButtonFor <TModel, TProperty>(this IFormGroup <TModel> formGroup, Expression <Func <TModel, TProperty> > expression, object value)
 {
     return(formGroup.YimaRadioButtonFor <TModel, TProperty>(expression, value, (IDictionary <string, object>)null));
 }