博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Aspx小记
阅读量:4618 次
发布时间:2019-06-09

本文共 1428 字,大约阅读时间需要 4 分钟。

 

关闭按钮

protected void Close_Click(object sender, EventArgs e)    {        //Page.RegisterStartupScript("close ", "  ");        ClientScript.RegisterStartupScript(Page.GetType(), "close", "  ");    }

  

在后台里看到这样的一段代码

Guid PK_Complaint = new Guid(dr["PK_Complaint"].ToString());//开始的时候不明白为什么还要加个new,可能是从string类型转成Guid的标准格式吧。

 主要是看这个out

static void Main(string[] args)      {         decimal res=1;         string str="0.1";//string str="asn";(这个是false,因为asn转不成decimal的类型         bool convertible= decimal.TryParse(str,out res);//把str的类型,转换成res的类型         Console.WriteLine(convertible);         Console.ReadKey();      }

  

string[] IMEI_SN = info.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);//算是以数组中的东西分割开来

string test = "程$晓$";  使用:string[] temp = test.Split(new string[] { "$" }, StringSplitOptions.RemoveEmptyEntries);  输出结果:数组长度为2 temp[0]="程" temp[1]="晓";   使用:string[] temp = test.Split(new string[] { "$" }, StringSplitOptions.None);或string[] temp = test.Split('$');  输出结果:数组长度为3 temp[0]="程" temp[1]="晓" temp[2]="";

在前台有个RadioButtonlist的按钮,在加载 的时候,从后台添加数据

string[] ary = System.Configuration.ConfigurationManager.AppSettings["xxx"].Split(',');   foreach (string i in ary)      {        RadioButtonList1.Items.Add(new ListItem(i));//这里的ListItem,因为Items是ListItemCollection      }  在后台获取list选择的那个值:RadioButtonList1.SelectedValue.ToString() == ""

转载于:https://www.cnblogs.com/ZkbFighting/p/9453135.html

你可能感兴趣的文章
借助过度区选择阈值
查看>>
价格正则
查看>>
对for 循环的初认识
查看>>
评论列表显示及排序,个人中心显示
查看>>
JavaWeb学习笔记总结 目录篇
查看>>
C#根据html生成PDF
查看>>
Neutron SDN 手动实现手册
查看>>
linux下core文件调试方法
查看>>
20个创意404错误页面设计的启示
查看>>
DBCP连接池配置参数说明
查看>>
C语言实现四舍五入
查看>>
SSH创建公钥实现无密码操作失败原因
查看>>
【转】Javascript模块化编程(三):require.js的用法
查看>>
需求规格说明书
查看>>
python mysql 查询返回字典结构
查看>>
mysql 统计sql
查看>>
Java中的抽象类
查看>>
关于Altium Designer的BOM,元件清单
查看>>
使用MongoDB ruby驱动进行简单连接/CRUD/运行命令
查看>>
关于set和multiset的一些用法
查看>>