请问该如何美化dropdownlist及textbox框中的style呢?

michael2004 2003-09-12 04:07:00
RT
...全文
55 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
kinglately 2003-09-19
  • 打赏
  • 举报
回复
只能修改背景色和前景色,要想完全做得和网页配合,就得用javascript+css模拟了,搜一下以前的贴子,很多的:)
Ajax实现无刷新三联动下拉框 1.html代码 Ajax实现无刷新三联动下拉框
style="Z-INDEX: 101; LEFT: 96px; POSITION: absolute; TOP: 32px" cellSpacing="1" cellPadding="1" width="300" border="1" bgColor="#ccff66">
省市 dropdownlist id="DropDownList1" runat="server">dropdownlist>
城市 dropdownlist id="DropDownList2" runat="server">dropdownlist>
市区 dropdownlist id="DropDownList3" runat="server">dropdownlist>
TextBox id="TextBox1" style="Z-INDEX: 102; LEFT: 416px; POSITION: absolute; TOP: 48px" runat="server" Width="424px">TextBox>style="Z-INDEX: 103; LEFT: 456px; WIDTH: 56px; POSITION: absolute; TOP: 96px; HEIGHT: 24px" type="button" value="test" onclick="getData();">
2.cs代码 using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; namespace AjaxTest { /**//// /// Summary description for WebForm1. /// public class WebForm1 : System.Web.UI.Page { protected System.Web.UI.WebControls.DropDownList DropDownList1; protected System.Web.UI.WebControls.DropDownList DropDownList2; protected System.Web.UI.WebControls.TextBox TextBox1; protected System.Web.UI.WebControls.DropDownList DropDownList3; private void Page_Load(object sender, System.EventArgs e) { Ajax.Utility.RegisterTypeForAjax(typeof(AjaxMethod)); if(!Page.IsPostBack) { this.DropDownList1.DataSource=AjaxMethod.GetProvinceList(); this.DropDownList1.DataTextField="province"; this.DropDownList1.DataValueField="provinceID"; this.DropDownList1.DataBind(); this.DropDownList1.Attributes.Add("onclick","cityResult();"); this.DropDownList2.Attributes.Add("onclick","areaResult();"); } } Web Form Designer generated code#region Web Form Designer generated code override protected void OnInit(EventArgs e) { // // CODEGEN: This call is required by the ASP.NET Web Form Designer. // InitializeComponent(); base.OnInit(e); } /**//// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { this.Load += new System.EventHandler(this.Page_Load); } #endregion } }3.AjaxMethod using System; using System.Data; using System.Data.SqlClient; namespace AjaxTest { /**//// /// Summary description for AjaxMethod. /// public class AjaxMethod { GetProvinceList#region GetProvinceList public static DataSet GetProvinceList() { string sql="select * from province"; return GetDataSet(sql); } #endregion GetCityList#region GetCityList [Ajax.AjaxMethod(Ajax.HttpSessionStateRequirement.Read)] public DataSet GetCityList(int provinceid) { string sql="select * from city where father="+provinceid; return GetDataSet(sql); } #endregion GetAreaList#region GetAreaList [Ajax.AjaxMethod(Ajax.HttpSessionStateRequirement.Read)] public DataSet GetAreaList(int cityid) { string sql="select * from area where father="+cityid; return GetDataSet(sql); } #endregion GetDataSet#region GetDataSet public static DataSet GetDataSet(string sql) { string ConnectionString=System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"]; SqlDataAdapter sda =new SqlDataAdapter(sql,ConnectionString); DataSet ds=new DataSet(); sda.Fill(ds); return ds; } #endregion } }4.web.config
ASP.NET实验报告 题目:ASP.NET效劳器控件 院系:计算机科学与工程学院 【实验题目】 ASP.NET效劳器控件 【实验目的】 1.熟悉用户控件的使用。 2.熟悉导航控件的使用。 3.掌握母版页的使用。 【实验容】 设计一个个人情况调查程序,程序启动后显示如以下图的页面。用户在填写了、选择了 性别、喜爱的歌手、居住城市、个人爱好后单击"提交〞按钮后,屏幕显示用户填写或选 择的数据信息。假设用户没填写就单击"提交〞按钮,屏幕显示出错提示信息;假设用户 没有选择"爱好〞工程,单击 "提交〞按钮, "爱好〞工程栏中显示"真可惜,你没有任何爱好!〞。 翻开Visual Studio 2021创立一个,在Default.aspx页面上进展页面的设计,此时可以切换到设计视图,也 可以使用拆分视图方便对照。 设计Web页面 Web页面中标题"个人情况调查〞为图片格式,在下面已经给出,请同学们右键单击下 面的图片,保存到本地硬盘,再在程序过ImageMap控件添加进页面。 : 设置对象属性 Web页面中需包含以下控件,Label控件、TextBox控件、Button控件、LinkButton控 件、ImageMap控件、RadioButton控件、DropDownList控件、ListItem控件、RadioButt onList控件、CheckBoxList控件等控件,并设置好每个对象的属性。开发界面如图3- 1所示。 图 3-1 程序开发界面 编写事件代码 运行和调试程序 程序最终运行界面如图3-2所示。 图 3-2 程序运行界面 【实验代码】 <%PageLanguage="C*"AutoEventWireup="true"CodeFileInherits="_Default"%> ASP.NET效劳器控件的使用 style="text-align: left"> style="text-align: left"> style="font-size: 16pt">
style="text-align: left"> style="width: 125px"> TextBoxID="txtName"runat="server"Width="77px">TextBox> style="width: 329px; text-align: left">  性别 style="width: 125px"> 你喜爱的歌手是 style="width: 329px; text-align: left">   DropDownListID="dropSinger"runat="server"> ListItem>五月天ListItem> ListItem>宗盛ListItem> ListItem>梁静茹ListItem> ListItem>惠妹ListItem> ListItem>汪峰ListItem> DropDownList> style="width: 125px"> 你家住哪里 style="w
新闻系统 acess+vs <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <%@ Register Src="custom/bottom.ascx" TagName="bottom" TagPrefix="uc1" %> 新闻主页 style="background-image:url([~/image/bg1.jpg]); background-color:Silver" >
style="position:absolute; left:100px;right:100px; width:800px; top: 0px; height: 500px;">
style="position:absolute;width:800px;top:0px; left:0px; height:100px;">

Style="None" Font-Bold="True" Font-Names="宋体" Font-Size="45px" Font-Strikeout="False" Font-Underline="True" Text="欢迎进入浏览新闻" ForeColor="Fuchsia">
style="position:absolute;width:800px;top:100px; left:0px;">   TextBox ID="TextBox1" runat="server" Width="127px">TextBox>              
style="position:absolute; left:0px;width:100px; height: 163px;top:130px"> List ID="DataList1" runat="server" DataKeyField="KeyId" HorizontalAlign="Left" OnItemCommand="DataList1_ItemCommand" Width="100px" Font-Size="Small" >     Style BorderStyle="None" HorizontalAlign="Center" /> List>
style="position:absolute; left:100px;width:600px; top: 130px;"> Style ForeColor="Lime" /> Style ForeColor="Cyan" /> Style ForeColor="Yellow" /> Style HorizontalAlign="Center" VerticalAlign="Middle" /> Style HorizontalAlign="Center" VerticalAlign="Middle" />
style="position:absolute; right:0px;width:100px; height: 163px;top:130px"> DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" Width="98px" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"> DropDownList>
style="position:absolute;width:700px; bottom:0px; left: 50px;">

61,112

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧