asp.net使用css的问题 谢谢!!

来源:百度知道 编辑:UC知道 时间:2024/07/04 22:45:41
一个自动处理过长字符串显示的控件(1.css) 代码如下:

using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;

namespace cnblogs.birdshome.WebControls
{
/// <summary>
/// Summary description for AutoLabel.
/// </summary>
[DefaultProperty("Text"),
ToolboxData("<{0}:AutoLabel runat=server></{0}:AutoLabel>")]
public class AutoLabel : System.Web.UI.WebControls.Label
{
protected override void CreateChildControls()
{
base.CreateChildControls ();
this.Width = Unit.Percentage(100);
this.Attributes["onmouseover"] =
"if ( this.clientWidth < this.scrollWidth ) this.title = this.innerText; else this.title = '';";
this.Attributes.CssStyle["white-space"] = "nowrap";

把AutoLabel从工具箱拖到<label style="overflow:hidden;width:100px;">
<%#Eval("ProjectName")%></label>,除了<%#Eval("ProjectName")%>别的都替换掉

没表达清楚,

上面的那个叫做1.css吗?