获取或设置一个值,该值指示当到达单元格末尾时,由 HtmlTableCell 类的实例所表示的单元格中的文本是否自动继续在下一行显示。Gets or sets a value indicating whether the text in a cell represented by an instance of the HtmlTableCell class automatically continues on the next line when it reaches the end of the cell.

public:

property bool NoWrap { bool get(); void set(bool value); };

public bool NoWrap { get; set; }

[System.ComponentModel.TypeConverter(typeof(System.Web.UI.MinimizableAttributeTypeConverter))]

public bool NoWrap { get; set; }

member this.NoWrap : bool with get, set

[]

member this.NoWrap : bool with get, set

Public Property NoWrap As Boolean

属性值

如果在单元格中文本不自动换行,则为 true;否则,为 false。true if the text does not automatically wrap in the cell; otherwise, false. 默认值是 false。The default value is false.

示例

下面的代码示例演示如何使用属性以 NoWrap 编程方式控制文本是否换行到控件的单元格中 HtmlTable 。The following code example demonstrates how to use the NoWrap property to programmatically control whether the text wraps in the cells of an HtmlTable control.

/p>

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

void Button_Click(Object sender, EventArgs e)

{

// Iterate through the rows of the table.

for (int i = 0; i <= Table1.Rows.Count - 1; i++)

{

// Iterate through the cells of a row.

for (int j = 0; j <= Table1.Rows[i].Cells.Count - 1; j++)

{

// Update the properties of each cell.

Table1.Rows[i].Cells[j].Align = AlignSelect.Value;

Table1.Rows[i].Cells[j].NoWrap = Convert.ToBoolean(NoWrapSelect.Value);

Table1.Rows[i].Cells[j].VAlign = VAlignSelect.Value;

}

}

}

HtmlTableCell Example

HtmlTableCell Example

style="border-width: 1; border-color: Black">

Here is some content for Cell 1.

Here is some content for Cell 2.

Here is some content for Cell 3.

Here is some content for Cell 4.


Select the display settings for the cells in the table:

Align:

runat="server">

Left

Center

Right

NoWrap:

runat="server">

True

False

VAlign:

runat="server">

Top

Middle

Bottom

value="Generate Table"

onserverclick="Button_Click"

runat="server"/>

/p>

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Sub Button_Click(ByVal sender As Object, ByVal e As EventArgs)

Dim i As Integer

Dim j As Integer

' Iterate through the rows of the table.

For i = 0 To Table1.Rows.Count - 1

' Iterate through the cells of a row.

For j = 0 To Table1.Rows(i).Cells.Count - 1

' Update the properties of each cell.

Table1.Rows(i).Cells(j).Align = AlignSelect.Value

Table1.Rows(i).Cells(j).NoWrap = Convert.ToBoolean(NoWrapSelect.Value)

Table1.Rows(i).Cells(j).VAlign = VAlignSelect.Value

Next j

Next i

End Sub

HtmlTableCell Example

HtmlTableCell Example

style="border-width: 1; border-color: Black">

Here is some content for Cell 1.

Here is some content for Cell 2.

Here is some content for Cell 3.

Here is some content for Cell 4.


Select the display settings for the cells in the table:

Align:

runat="server">

Left

Center

Right

NoWrap:

runat="server">

True

False

VAlign:

runat="server">

Top

Middle

Bottom

value="Generate Table"

onserverclick="Button_Click"

runat="server"/>

注解

使用 NoWrap 属性来指定或确定由类的实例表示的单元格中的文本在 HtmlTableCell 到达单元格末尾时是否自动在下一行上继续。Use the NoWrap property to specify or determine whether the text in a cell represented by an instance of the HtmlTableCell class automatically continues on the next line when it reaches the end of the cell.

适用于

另请参阅

html table nowrap,HtmlTableCell.NoWrap 属性 (System.Web.UI.HtmlControls) | Microsoft Docs相关推荐

  1. select html value属性,HtmlSelect.DataValueField 属性 (System.Web.UI.HtmlControls) | Microsoft Docs...

    获取或设置数据源中要绑定到 Value 控件中各项的 HtmlSelect 属性的字段.Gets or sets the field from the data source to bind to t ...

  2. asp:boundfield html,BoundField 类 (System.Web.UI.WebControls) | Microsoft Docs

    BoundField 类 定义 表示数据绑定控件中以文本形式显示的字段.Represents a field that is displayed as text in a data-bound con ...

  3. login控件authenticate_Login.Authenticate 事件 (System.Web.UI.WebControls) | Microsoft Docs

    验证用户的身份后出现.Occurs when a user is authenticated. public: event System::Web::UI::WebControls::Authenti ...

  4. html5链接mvc,LinkExtensions.ActionLink 方法 (System.Web.Mvc.Html) | Microsoft Docs

    对于指定的链接文本.操作.控制器.协议.主机名.URL 片段.作为路由值字典的路由值和作为字典的 HTML 属性,返回一个定位点元素, (元素) . public static System.Web. ...

  5. 解决无法将类型为“System.Web.UI.WebControls.HiddenField”的对象强制转换为类型的错误...

    解决无法将类型为"System.Web.UI.WebControls.HiddenField"的对象强制转换为类型的错误 2008-01-04 16:14 本文章将解决: 1.解释 ...

  6. http://msdn.microsoft.com/zh-cn/library/system.web.ui.webcontrols.gridview.rowediting.aspx

    http://msdn.microsoft.com/zh-cn/library/system.web.ui.webcontrols.gridview.rowediting.aspx gridview的 ...

  7. Cannot convert type ‘ASP.login_aspx’ to ‘System.Web.UI.WebControls.Login’的解决方法

    这是Visual Studio 2005的一个Bug,VS进行网站发布(预编译)后,登录页中的"Login"控件和 .NET Framework 中"System.Web ...

  8. 错误 1 类型“System.Web.UI.ScriptManager”同时存在于“c:\windows\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0

    vs.net 2008中建ajax,调试时出现错误: 错误1 类型"System.Web.UI.ScriptManager"同时存在于"c:\windows\assemb ...

  9. asp.net中引用System.Web.UI.DataVisualization.Charting命名空间

    嗯,暂时不搞客户端了,发现用c#做的客户端现在是越来越找不到工作了,开始转行做网页了,别吐槽我学sap,我也不想,但是现在需要用,没办法,好了,言归正传 需要图表显示,网查了下用微软亲爹吧,方便,然后 ...

最新文章

  1. go通过thrift连接hbase_关于thrift协议改进畅想
  2. mysql打包成docker_web应用如何打包成docker镜像?
  3. Require Busy dialog
  4. LeetCode Contains Duplicate III
  5. MySQL.. ERROR! The server quit without updating PID file问题解决
  6. ecnu1244 积木游戏
  7. Windows2008|2003超出最大连接数
  8. Keras:框架架构
  9. iframe操作ie,firefox兼容
  10. 新梦想干货——软件测试中的43个功能测试点(下)
  11. C语言十折交叉验证,十折交叉验证10-fold cross validation, 数据集划分 训练集 验证集 测试集...
  12. 进栈顺序为abcd则出栈顺序为_进栈顺序为ABCDEFG 有可能的出站顺序是什么
  13. 计算机主板维修,计算机主板维修从业技能全程通(70M)*
  14. OUC2021秋-数值分析-期末(回忆版)
  15. ffmpeg里转场transition
  16. 在网页中插入FLV视频,经测试兼容IE、火狐、谷歌等浏览器
  17. 工业相机概述-选型事项-生产厂家汇总
  18. 画了张图,总结了机房里AAU、RRU以及各模块之间的走线关系和线束规格类型
  19. Quick BI 数据大屏快速入门
  20. RFC2889MAC地址学习速率——网络测试仪实操

热门文章

  1. 点石互动--Zac之:SEO本能发挥效力
  2. getElementById( ) 方法
  3. oracle数据库怎么调用函数,Oracle 11g调用函数几种常用方法
  4. CSS实现侧边栏导航
  5. Maluuba人工智能的阅读理解力最佳
  6. 【计算机科学】【2013.08】无人机路径规划问题的算法研究
  7. 魏永明 “自主”操作系统
  8. WebGL自学教程——WebGL示例:12. 要有光
  9. Oracle Star Schema简析
  10. 全新个性化地图服务发布,更好支持自定义地图样式