<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

protected void SubmitBtn_Click(object sender, EventArgs e)
{
firstselect.Attributes.Add("Multiple", "True");
}
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>AttributeCollection Example</title>
</head>

<body>
<form id="form1" runat="server">
<div>
Make a selection:
<select id="firstselect"
runat="server">
<option>This</option>
<option>That</option>
<option>Other</option>
</select>
<br/><br/>

<input type="submit"
id="submitbtn"
value="modify attribute"
onserverclick="SubmitBtn_Click"
runat="server"/>
</div>
</form>
</body>
</html>

https://docs.microsoft.com/zh-cn/dotnet/api/system.web.ui.attributecollection.add?redirectedfrom=MSDN&view=netframework-4.7.2#System_Web_UI_AttributeCollection_Add_System_String_System_String_

AttributeCollection.Add(String, String) Method的更多相关文章

  1. String.Join Method

    Overloads Join(String, String[], Int32, Int32) Concatenates the specified elements of a string array ...

  2. Java String Split Method

    Java String.split() method 有如下几种特殊情况: 1. 分隔符出现在首尾 public static void main(String args[]) { String St ...

  3. scrollTo(String text) and scrollToExact(String text) method of Android Driver not working

    Using the scrollTo(String text) and scrollToExact(String text) method of Android Driver. However the ...

  4. String+ String.Concat String.Format StringBuilder 之间的性能测试

    找到一篇国外的代码,专门来测试这个, String+ String.Concat String.Format StringBuilder 前三个在100个左右字符串差不多, String.Concat ...

  5. Java中list<Object[]>、list<Student>、list<Map<String,String>>排序

    1:list<Object[]>的排序   public static void main(String[] args) { // TODO Auto-generated method s ...

  6. KeyValuePair<string, string>

    ; #region CUP Method /// <summary> /// 请求与响应的超时时间 /// </summary> static public int Timeo ...

  7. alibaba fastjson List<Map<String, String>>2Str

    import java.util.ArrayList;import java.util.HashMap;import java.util.List;import java.util.Map; impo ...

  8. 从为什么String=String谈到StringBuilder和StringBuffer

    前言 有这么一段代码: public class TestMain { public static void main(String[] args) { String str0 = "123 ...

  9. C#基础总结之五Dictionary<string, string[]>和while循环

    #region 第五天作业 名片集(01) //Dictionary<string, string[]> PersonCard = new Dictionary<string, st ...

随机推荐

  1. ScrollView滑动的监听

    ScrollView滑动的监听 有时候我们须要监听ScrollView的滑动事件.来完毕业务需求. 第一种: 能够直接实现OnTouchListener接口.在这里面写你所须要的操作 scrollVi ...

  2. Apcahe Shiro学习笔记(一):简介及运行官方Demo

    一.Apache Shrio: apache shiro 是一个功能强大和易于使用的Java安全框架,为开发人员提供一个直观而全面的的解决方案的认证,授权,加密,会话管理. 支持认证跨一个或多个数据源 ...

  3. asp.net core 初探 二

    今天用@宇内流云大大的jexus 体验一下生产环境的发布,运行. 生产环境: centos 7 jexus 5.8.1 独立版 包含了mono (mono安装真心痛苦……) 开发环境就是昨天的Ubun ...

  4. beyond compare添加右键快捷方式

    如果安装beyond compare后,右键不能出现比较选项,可以通过设置 beyond compare完成. 选择 工具->选项,在资源管理器整合下面,有一个在资源管理器关联菜单中显示beyo ...

  5. Javascript MVC 学习笔记(二) 控制器和状态

    今天进入第二个部分:控制器. 控制器和状态 从以往的开发经验来看.我们都是将状态保存在server的session或者本地cookie中,但Javascript应用往往被限制在单页面,所以我们也能够将 ...

  6. 九度OJ 1088:剩下的树 (线段树)

    时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:5791 解决:2649 题目描述: 有一个长度为整数L(1<=L<=10000)的马路,可以想象成数轴上长度为L的一个线段,起点 ...

  7. Page (computer memory)

    A page, memory page, or virtual page is a fixed-length contiguous block of virtual memory, described ...

  8. 我所认为的KVC和KVO

    引子:    ​   为什么要写这个,只是突然一个念头闪现,说一下本人目前理解.KVC:    ​   Key-value coding,它是一种使用字符串标识符,间接访问对象属性的机制.但是关就这一 ...

  9. SPOJ7258

    传送门 这题可以参考平衡树求第k大的过程,需要预处理一下从当前节点往下走能走出多少个子串. 原本准备存个图用反向的topsort,发现极为麻烦,看了别人的代码后发现,他们按step大小用了基排,省了很 ...

  10. VK Cup 2015 - Round 2 E. Correcting Mistakes —— 字符串

    题目链接:http://codeforces.com/contest/533/problem/E E. Correcting Mistakes time limit per test 2 second ...