通过C#向控件添加一个glyphicon
Adding a glyphicon to a control through c#
Dim glyph As HtmlControls.HtmlGenericControl
glyph = New HtmlControls.HtmlGenericControl
glyph.InnerHtml = "<span class=""glyphicons glyphicons-restart""></span> Reset"
btnBarButtonBar.SummaryButton.Controls.Add(glyph)
我目前正在通过 VB 这样做,但是有人可以帮我把它转换成 C# 吗?我只需要替换通过框架构建的当前摘要按钮,并将用户定向到另一个页面,并将其替换为将所有值重置为空白的按钮。我的 .asp 页面已经在使用上面的代码工作,我现在需要转换为以便它在 aspx/c#
中工作
var glyph = new HtmlControls.HtmlGenericControl();
glyph.InnerHtml = "<span class=\"glyphicons glyphicons-restart\"></span> Reset";
btnBarButtonBar.SummaryButton.Controls.Add(glyph);
Dim glyph As HtmlControls.HtmlGenericControl
glyph = New HtmlControls.HtmlGenericControl
glyph.InnerHtml = "<span class=""glyphicons glyphicons-restart""></span> Reset"
btnBarButtonBar.SummaryButton.Controls.Add(glyph)
我目前正在通过 VB 这样做,但是有人可以帮我把它转换成 C# 吗?我只需要替换通过框架构建的当前摘要按钮,并将用户定向到另一个页面,并将其替换为将所有值重置为空白的按钮。我的 .asp 页面已经在使用上面的代码工作,我现在需要转换为以便它在 aspx/c#
中工作var glyph = new HtmlControls.HtmlGenericControl();
glyph.InnerHtml = "<span class=\"glyphicons glyphicons-restart\"></span> Reset";
btnBarButtonBar.SummaryButton.Controls.Add(glyph);