惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
DataBreaches.Net
N
Netflix TechBlog - Medium
P
Proofpoint News Feed
D
Docker
J
Java Code Geeks
L
LangChain Blog
Microsoft Security Blog
Microsoft Security Blog
The GitHub Blog
The GitHub Blog
I
InfoQ
Stack Overflow Blog
Stack Overflow Blog
云风的 BLOG
云风的 BLOG
Engineering at Meta
Engineering at Meta
MongoDB | Blog
MongoDB | Blog
月光博客
月光博客
T
Tailwind CSS Blog
M
MIT News - Artificial intelligence
Blog — PlanetScale
Blog — PlanetScale
Google DeepMind News
Google DeepMind News
腾讯CDC
罗磊的独立博客
U
Unit 42
爱范儿
爱范儿
Vercel News
Vercel News
MyScale Blog
MyScale Blog

博客园 - Snow*Cao

request 生命周期及参数信息 vs2010 调试快捷键 温故而知新:封装、继承、多态 海量的jQuery插件帖,很经典 委托事件的理解(转载) 常用JQuery插件整理 关于数据挖掘的详细介绍的一些网址 Python 开发环境搭建 WCF优秀资源整理--持续更新 Python入门视频教程 txt文本导入到sql server数据库 抽象基类与接口,共性与个性的选择!(区别) C#中值类型和引用类型 通过IIS自带工具Iisapp.vbs查询哪个站点占用资源 主键与外键 分布式缓存BeIT Memcached简介 HttpHandlers和HttpModules接口详解 ASP.NET页面运行机制 jquery跨域获取数据以及分页 - Snow*Cao - 博客园
DropDownList 默认展示从数据库查询的值
Snow*Cao · 2011-07-13 · via 博客园 - Snow*Cao

1、 DropDownList 默认展示从数据库查询的值

 DropDownList1.Items.FindByValue(model.ClassConfig.ToString()---要展示的值).Selected = true;

2、RadioButtonList1 对查询出来的数据默认展示

foreach (ListItem item in this.RadioButtonList1.Items)
           {
            
if (item.Value == model.IsChildorg.ToString())//modeluser.userpower.tostring()为你要赋值的值
               {
                   item.Selected 
= true;
                   
break;
               }
           }