文件名称:在页面设置自定义控中控件的大小
文件大小:5KB
文件格式:RAR
更新时间:2012-05-29 06:05:43
在页面设置自定义控中控件的大小
using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; public partial class test : System.Web.UI.UserControl { protected void Page_Load(object sender, EventArgs e) { TextBox1.Height = _txtheight; TextBox1.Width = _txtwidth; TextBox2.Height = _txtheight; TextBox2.Width = _txtwidth; Button1.Height = _labheight; Button1.Width = _labwidth; } private int _labheight; private int _labwidth; private int _txtheight; private int _txtwidth; public int laheight { get { return _labheight; } set { _labheight = value; } } public int labwidth { get { return _labwidth; } set { _labwidth = value; } } public int txtheight { get { return _txtheight; } set { _txtheight = value; } } public int txtwidth { get { return _txtwidth; } set { _txtwidth = value; } } protected void Button1_Click(object sender, EventArgs e) { Button1.Text = (Convert.ToInt32(TextBox1.Text) + Convert.ToInt32(TextBox2.Text)).ToString(); } }
【文件预览】:
在页面设置自定义控中控件的大小
----web.config(8KB)
----App_Data()
----Default.aspx(3KB)
----Default.aspx.cs(999B)
----test.ascx.cs(2KB)
----test.ascx(330B)