让RadioButtonList 像Tab菜单控件一样显示

c#自定义控件的制作,美化的RadioButton 自定义一个RadioButton,增加了设置小圆框的多种颜色外观,可以拖放到工具箱里使用 立即下载

 引用的CSS

.radiobuttonlist
{
    font: 12px Verdana, sans-serif;
    color: #000; /* non selected color */
}
 
.radiobuttonlist input
{
    width: 0px;
    height: 0px;
}
.radiobuttonlist label
{
    color: #3E3928;
    background-color:#E8E5D4;
    padding-left: 6px;
    padding-right: 6px;
    padding-top: 2px;
    padding-bottom: 2px;
    border: 1px solid #AAAAAA;
    margin: 0px 0px 0px 0px;
    white-space: nowrap;
    clear: left;
    margin-right: 5px;
}
.radiobuttonlist span.selectedradio label
{
    background-color: #F7F5E8;
    color: #000000;
    font-weight: bold;
    border-bottom-color: #F3F2E7;
    padding-top:4px;
 
}
.radiobuttonlist label:hover
{
    color: #CC3300;
    background: #D1CFC2;
}
 
.radiobuttoncontainer
{
    position:relative;
    z-index:1;
}
 
.radiobuttonbackground
{
    position:relative;
    z-index:0;
    border: solid 1px #AcA899; 
    padding: 10px; 
    background-color:#F3F2E7;
}
使用方法如下:
设置RadioButtonList的RepeatLayout"属性 为 "Flow"
如下:
<div class="radiobuttoncontainer">
    <asp:RadioButtonList ID="optTabs" runat="server" AutoPostBack="true" RepeatDirection="Horizontal"
        RepeatLayout="Flow" CssClass="radiobuttonlist">
        <asp:ListItem runat="server" Text="Locations" Value="LocationInformation_Manage"></asp:ListItem>
        <asp:ListItem Text="Address" Value="Address_Manage"></asp:ListItem>
        <asp:ListItem Text="Contacts" Value="Contacts_Manage"></asp:ListItem>
        <asp:ListItem Text="Comments" Value="CommentsList_Manage"></asp:ListItem>
        <asp:ListItem Text="Conveyances" Value="ConveyanceList_Manage"></asp:ListItem>
        <asp:ListItem Text="Permits" Value="PermitList_Manage"></asp:ListItem>
        <asp:ListItem Text="Invoices" Value="TransactionList_Manage"></asp:ListItem>
        <asp:ListItem Text="Analyze Invoices" Value="Annual_Invoice_Analysis_View"></asp:ListItem>
    </asp:RadioButtonList>
</div>
<div class="radiobuttonbackground">
    <asp:PlaceHolder ID="phEntity"  runat="server"></asp:PlaceHolder>
</div>
最后在Page_Load中添加如下代码:
optTabs.SelectedItem.Attributes.Add("class", "selectedradio")

一切OK,效果图如下:

RadioButtonList 横向列表 免费下载 立即下载

相关推荐

ASP.NET中 RadioButtonList 单选按钮组控件的使用方法

本文主要简单介绍RadioButtonList控件的常见属性和使用方法,希望对大家有所帮助。

RadioButtonList的radio样式

<asp:RadioButtonList ID="Sex" runat="server" ClientIDMode="Static" RepeatDirection="Horizontal" CssClass="Radio" Enabled="false"> <asp:ListItem Value="男">男</asp:ListItem> <asp:ListItem Value="女">女&lt.

LuYanLin_的博客 790

MOSFET开关损耗全面讲解:从原理到优化策略

深入剖析MOSFET开关损耗的产生机制,结合实际应用场景,讲解如何通过驱动设计和电路优化降低损耗,提升系统效率。重点关注mosfet在高频开关下的表现与热管理。

weixin_29476595的博客 1058

RadioButtonList样式

1. 属性:横向排列  RepeatDirection="Horizontal"   列之间距离  width属性:依据宽度可以拉开距离(只有两项时已验证过)   猜猜:行距离  height属性

jiutouniao19的博客 931

IGV实战指南:从数据导入到Peak可视化的全流程解析

本文提供了一份IGV实战指南,详细解析了从数据导入到Peak可视化的全流程。内容包括软件安装、参考基因组加载、测序数据处理、信号调整以及如何精准定位和可视化Peak区域,并分享了导出出版级矢量图的高级技巧,帮助用户高效完成基因组数据可视化分析。

weixin_29212867的博客 147

别再只会regress了!用Stata的csdid命令搞定多期DID的完整实操指南

本文详细介绍了如何在Stata中使用csdid命令进行多期DID分析,解决传统DID方法在交错处理场景下的局限性。通过完整的实操指南,包括环境搭建、核心语法、结果解读和高阶应用,帮助研究者更准确地评估政策效果,适用于计量经济学和实证研究领域。

weixin_30236595的博客 582

.net2005 radiosbuttonlist 控件控制文本显示!

var Radios = document.getElementsByName("rbtlistWarrant");function showText(obj)...{var lblAccreditText = document.getElementById("lblAccreditText");                    if(obj.tagName == "INPUT").

marxTen的专栏 1207

从零开始搭建企业级安全扫描平台:基于Docker的Greenbone和ClamAV部署指南

本文提供了一份基于Docker容器技术,从零开始搭建企业级安全扫描平台的实战指南。详细介绍了如何部署和集成漏洞扫描工具Greenbone与病毒扫描工具ClamAV,涵盖架构设计、Docker环境优化、容器化部署步骤以及平台集成与监控方案,帮助企业构建自动化、可扩展的安全防御核心组件。

delta的博客 755

ASP.NET中 RadioButtonList(单选按钮组)的使用

ylbtech-ASP.NET-Control-Basic:RadioButtonList(单选按钮组)的使用  ASP.NET中 RadioButtonList(单选按钮组)的使用。 1.A,运行效果返回顶部 RadioButtonList(单选按钮组)   属性 值 作用   RepeatDi

古老的未来 1万+

信创那些事儿——Spring Boot中集成东方通中间件(TongWeb)

在Spring Boot中集成东方通中间件(如TongWeb作为Servlet容器)通常涉及几个步骤,但需要注意的是,TongWeb本身是一个独立的Java EE应用服务器,而不是像Tomcat那样可以直接嵌入到Spring Boot应用中的中间件。因此,集成通常意味着将Spring Boot应用打包为WAR文件并部署到TongWeb服务器上。

来北欧写代码 6489

从DDPM到DDIM:深入解读《Denoising Diffusion Implicit Models》

DDIM发表在ICRL2021上,是DDPM重要的改进之一,能显著提高DDPM的样本质量、减少采样时间,并且能显式控制插值,已经被广泛应用到现在的Diffusion Models上。这篇博客和大家一起详细解读一下DDIM,认识这一伟大的模型。.........

沉迷单车的追风少年 1万+

RadioButtonList用法总结

这个控件可以做为判断来用,它还有事件响应机制,但要注意,若想应用其事件响应必须设置AutoPostBack="True".其事件响应能过OnSelectedIndexChanged="后台事件名称"   响应.其实最好的办法就是在设计界面双击它,便会自动生成.之后您就可以在后台的对应方法中写代码了如 正常

晓春明月 5781

微信小程序 - 解决报错 {“errcode“:41002,“errmsg“:“appid missing, rid: X“} 微信报错错误码errcode“:41002问题分析及解决教程(详细排查)

【微信小程序】报错{“errcode“:41002,“errmsg“:“appid missing, rid: 64e55770-67c1fb7e-027c5a70“}:【微信小程序】微信小程序登录请求出现appid missing提示,微信公众号{"errcode":41002,"errmsg":"appid missing"},微信 报错{“errcode“:41002,“errmsg“:“appid missing,微信小程序获取openid返回appid missing的问题,微信小程序提示Erro

🏆 前端领域优质创作者 5650

updatepanel中的GridView中的radiobuttonList怎么设置样式

步骤: 1:在单选按钮组控件中 添加属性 RepeatLayout ,其值选“flow”<asp:RadioButtonList ID="rblcellstat" runat="server" Width="240px" RepeatDirection="Horizontal" RepeatLayout="flow"> (说明:选“flow”,RadioButtonLi...

weixin_33724570的博客 222

Open3D 计算点云模型的表面积和体积【2025最新版】

python编程实现 计算点云模型的表面积和体积,博客长期更新,本文最近一次更新时间为:2025年4月4日。

点云侠的博客 13万+

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

css盒子模型_【Hello CSS】第二章CSS的逻辑属性与盒子模型

首发:krissarea.gitee.io(https://krissarea.gitee.io/blog/css/Hello_CSS/第二章-CSS的逻辑属性与盒子模型.html)作者:陈大鱼头(https://juejin.im/user/576b433bd342d30057aaa1e9/posts)github:KRISACHAN(https://github.com/KR...

weixin_39603823的博客 345

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

asp.net RadioButtonList控件样式调整

RadioButtonList在IE中是以table的形式存在, 如果在CSS中曾经设置任意一个table的border=1,那么就要在CSS中另外加上#rdlst td{border:0;},否则RadioButtonList会出现边框。然后再加上 CellPadding=“X”,即可以没有边框且间隔手工调整。 设置项目之间的距离: 设置RadioButtonList的CellPaddi...

weixin_30628077的博客 759

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

几个常用的控件(2)

几个常用控件及其应用

m0_62263513的博客 2385

关于CheckBoxList和RadioButtonList的几个问题

  其实我一向很少用关于"list"的控件,因为有DataGrid就基本上都搞定了,然而一方面是为了学习,另一方面也可以灵活的应用更多的控件,于是采用了其中的几个控件,但没想到结果令我大失所望。。。。  先看看DataList控件,它的使用最郁闷的是不能在IDE环境里绑定数据,而只能用模板(不知道是不是我没学会)。                     &lt;asp:DataList id=...

weixin_34344403的博客 276

RadioButtonList 设置选中项,样式在同一行

RadioButtonList 设置选中项,样式在同一行

人生若南柯一梦 4361

ASP.NET控件RadioButtonList更改背景色

这是在做预约问题时遇到的。 假如有1~5个号,可以供预约,那么当别人预约某些号码过后,就把预约过的号码改为高亮显示,同时可选性也关闭! 当然具体问题是要结合数据库里数据的,在这里就不再写那么细了。只举个简单的例子。

蘑菇猎手的专栏 2327
上一篇: 用javascript实现状态栏的显示
下一篇: 对数据库中存储过程进行加密
xiaoding133
博客等级 码龄19年 415粉丝 159原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值