louby


public static class HtmlHelper
{
/// <summary>
/// 返回没有边框的只读的TextBox标签
/// </summary>
/// <typeparam name="TModel"></typeparam>
/// <typeparam name="TValue"></typeparam>
/// <param name="html"></param>
/// <param name="expression"></param>
/// <returns></returns>
public static MvcHtmlString EditorReadFor<TModel, TValue>(this HtmlHelper<TModel> html, Expression<Func<TModel, TValue>> expression)
{
string format = null;
object htmlAttributes = new
{
@readonly = "readonly",
@style = "border:none"
};
return html.TextBoxFor(expression, format, htmlAttributes);
}
}

分类:

技术点:

相关文章:

  • 2021-12-14
  • 2021-12-10
  • 2021-11-04
  • 2021-10-25
  • 2021-12-14
  • 2021-12-10
  • 2022-12-23
  • 2021-12-10
猜你喜欢
  • 2021-12-04
  • 2021-12-04
  • 2021-12-14
  • 2021-10-19
  • 2021-09-27
  • 2021-12-10
  • 2021-12-14
相关资源
相似解决方案