
c#类 2.0
文章平均质量分 50
xiaotuzi
兔子喜欢什么,我就喜欢什么。
展开
-
构建form,保护隐私数据传递给本身,并且通过pre_init改变theme
Default.aspx @ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xh原创 2010-04-05 09:16:00 · 508 阅读 · 0 评论 -
checklistbox的详细用法
DataSourceID="SqlDataSource1" DataTextField="city" DataValueField="au_id" OnDataBound="CheckBoxList1_DataBound1" OnSelectedIndexChanged="CheckBoxList1_SelectedIndexChanged1">原创 2010-03-20 10:57:00 · 2733 阅读 · 0 评论 -
得到客户机器的ip地址
request.UserHostAddress原创 2010-03-19 11:18:00 · 328 阅读 · 0 评论 -
上传后立即显示图片以及urldecode
//程序名称:5-08.aspx.cs//程序功能:5-08.aspx的后台功能代码using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System原创 2010-03-22 14:48:00 · 545 阅读 · 0 评论 -
强制转换和indexof, lastindexof 以及substring
在C#中对数值类型转换为字符类型或是逆转换,是不能强制转换的,但int double float可以相互强制转换不过有几个类可以实现数值类型转换为字符类型Convert是转换类,还有一个是以数据类型开头的类如Int16、Int32等像你那个转换可以用以下两种转换实现int mmm=Int32.Parse(mm);或者int mmm=Convert.Int32(mm)原创 2010-03-22 13:36:00 · 898 阅读 · 0 评论 -
c sharp 命令行的用法
使用 C# 2.0 命令行编译器http://msdn.microsoft.com/zh-cn/library/ms379563(vs.80).aspx#mainSection摘要:本文分析了使用 C# 命令行编译器 csc.exe 生成应用程序的过程。同时,还将向读者介绍很多为 C# 2.0 独有的编译器选项,例如,extended/reference 标志和强名称支持。阅读完本文的内容原创 2010-03-15 14:13:00 · 5325 阅读 · 0 评论 -
struct原来也有方法,兔子很高兴
C# 程序员参考--结构教程 此教程包括两个示例。第一个示例向您展示如何声明和使用结构,而第二个示例演示向方法传递实例时结构和类之间的差异。还向您介绍下列主题:结构与类 堆还是堆栈? 构造函数和继承 结构上的属性 示例 1 本示例声明一个结构,它有三个成员:一个属性、一个方法和一个私有字段。本示例创建该结构的一个实例,并将其投入使用:// struct1.csusing System;原创 2010-03-14 20:31:00 · 428 阅读 · 0 评论 -
javascript看源代码
用按钮显示源代码或者javascript里面的内容,有时会有function dennisboys(){var i=0;alert(document.documentElement.childNodes[0].outerHTML)}原创 2010-03-11 16:51:00 · 1197 阅读 · 0 评论 -
sda.fill(a,b)到底是啥意思?
SqlDataAdapter sda=new SqlDataAdapter();sda.SelectCommand=cmd;con.Open();DataSet ds=new DataSet()sda.fill(ds,"student");cn.Close();this.GridView1.DataSource=ds;this.GridView1.DataBind();原创 2009-04-06 11:39:00 · 7301 阅读 · 0 评论 -
request.mappath , request.physicalapplicationpath and Server.mappath
ASP.NET中Server.MapPath() 和 Request.MapPath() 与Request.PhysicalApplicationPath Response.Write(Request.PhysicalApplicationPath.ToString());Response.Write(Server.MapPath("mydb.mdb").ToString());经过实验,原创 2010-03-21 10:43:00 · 970 阅读 · 0 评论 -
FINDCONTROL的详细介绍
FindControl的使用方法 Control.FindControl (String):在当前的命名容器中搜索带指定 id 参数的服务器控件。(有点类似javascript中的getElementById(string))简单的例子: TextBox OnClick="Button1_Click" />原创 2010-03-21 13:08:00 · 8249 阅读 · 7 评论 -
html控件,html服务器控件,web服务器控件的区别
html控件、html服务器控件和web服务器控件的区别 asp.net之所以现在开发方便和快捷,关键是它有一组强大的控件库,包括web服务器控件,web用户控件,web自定义控件,html服务器控件和html控件等。这里我主要说说html控件、html服务器控件和web服务器控件的区别。 1、html控件:就是我们通常的说的html语言标记,这些语言标记在已往的静态页面和其他网页里存在,原创 2010-03-21 14:24:00 · 967 阅读 · 0 评论 -
构建form提交
http://topic.youkuaiyun.com/u/20090427/16/7A11B262-046A-491B-94B1-3E06BD6585A9.html转载 2010-04-04 21:17:00 · 409 阅读 · 0 评论 -
PreInit 在内容页改变母版页
因此,为了设置母版页,需要在内容页面代码中包含下面的代码:protected void Page_PreInit(object sender, EventArgs e) { Page.MasterPageFile = "~/MasterPage.master"; } 确保在web.config文件中或内容页面的@Page指令中没有引用MasterPageFile的元素(如果在本书前面原创 2010-03-31 16:38:00 · 1153 阅读 · 1 评论 -
编译器错误信息: CS0433: 类型“”同时存在于
编译器错误信息: CS0433: 类型“”同时存在于 编译器错误信息: CS0433: 类型“web_GovOpen_Article”同时存在于“c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/7657163f/99593400/assembly/dl3/cee24735/00c6608e_9原创 2010-03-30 16:12:00 · 13445 阅读 · 3 评论 -
嵌套母版页和半透明
AutoEventWireup="true" CodeFile="9-03.aspx.cs" Inherits="_9_03" Title="Untitled Page" %> Runat="Server">我是引用子母版页的内容页 I am xuhaitian CodeFile="FMasterPage.master.cs" Inherits=原创 2010-03-31 16:22:00 · 1055 阅读 · 0 评论 -
内容页和母板页互访
、这里的声明指示符中多了一项MasterPageFile="~/MasterPage/MP.master",这一项是在创建内容页面时根据“选择母版页”复选框的选中情况生成的。它指明了该页是内容页面,也指明了该内容页面的母版页是哪个页面。 2、“”就是要在其中显示的内容。一、在母版页中编写后台代码,访问母版页中的控件: 与普通的aspx页面一样,双击按钮即可编写母版页中的代码 二、原创 2010-03-31 11:32:00 · 960 阅读 · 0 评论 -
自定义控件中EnsureChildControls
看了msdn ://确保服务器控件是否包含子控件。如果不包含,则创建子控件。 还是不明白? 是在CreateChildControls方法里创建的子控件没有子控件当然就不能创建了。你没有仔细看MSDN啊 This method first checks the current value of the ChildControlsCre原创 2010-03-30 15:16:00 · 1297 阅读 · 0 评论 -
cs 操作 html的思路
在.cs文件中尝试修改/读取 非服务器控件元素属性。 比如我在 html里面有个 (不包含runat="server!)" 。 现在想在.cs后台文件里读取或者修改该img的一些属性。 该如何实现。 读取和修改都举个例子。 谢谢啦。如果你非得不用服务器控件 可以通过ClientManager.RegisterStartUpScript 方法然后输出js 来操作img你可以放在Lite原创 2010-03-21 15:28:00 · 835 阅读 · 0 评论 -
如何显示多重菜单,利用子菜单。
ASP.NET:使用Menu控件制作横向菜单2008年11月6日(星期四) 19点16分 作者: 宇航 天气: 心情: 一般 http://hi.baidu.com/zhenyanzi/blog/item/868533ad8739d30b4a36d62e.htmlASP.NET:使用Menu控件制作横向菜单在ASP.NET里刚开始使用Menu时,发现它的菜单只有一个顶级菜单,其余的是弹出式的菜单转载 2009-03-28 14:53:00 · 1170 阅读 · 0 评论 -
datamember 的含义和其他
您还没有登录![ 快速登录 ][ 登录 ][ 注册 ] 天极传媒: 比特网 | 天极网 | IT专家网 | IT商网 | 52PK游戏网 | 手机天极 | IT分众 | 首页 数据库 基础架构 :服务器 存储 数据中心 虚拟化 软件:SOA 管理软件 数据库 开发平台 网络与安全: 网络通信 安全 操作系统:WinSystem Linux Unix 信息化: CIO 中小企业IT 新闻 白皮书转载 2009-03-22 18:42:00 · 4976 阅读 · 0 评论 -
关于注释
///a special comment 上面这种注释,可以通过配置vs2005,在编译工程时,提取注释后面的文本,创建一个特殊格式的文本文件.该文件可用于创建文档说明书.原创 2009-01-15 15:51:00 · 408 阅读 · 0 评论 -
c# 中的数组的操作
int[] myArray={1,2,3,7,9}; //这个与下面这个等价int[] myArray=new int[5]{1,2,3,7,9}; 关于多维数组3*2的两维数组:int[,] myArray2={{0,1},{2,3},{4,5}}; ////要访问第一行第二列数组元素:myArray2[0,1]; //值为1 关于不规则数组int [][原创 2009-01-15 15:32:00 · 816 阅读 · 0 评论 -
string的各种各样的格式化
using System;using System.Collections.Generic;using System.Text;namespace ConsoleApplication6{ class Program { //定义枚举类型 enum Color { Yellow = 1, Blue, Green }; //定义日期类型并获原创 2009-01-17 20:38:00 · 683 阅读 · 0 评论 -
装箱和拆箱
装箱和拆箱:任何值类型、引用类型可以和object(对象)类型之间进行转换。装箱转换是指将一个值类型隐式或显式地转换成一个object类型,或者把这个值类型转换成一个被该值类型应用的接口类型(interface-type)。把一个值类型的值装箱,就是创建一个object实例并将这个值复制给这个object,装箱后的object对象中的数据位于堆中,堆中的地址在栈中。被装箱的类型的值是作为一个拷贝转载 2009-01-15 16:24:00 · 490 阅读 · 0 评论 -
枚举和结构类型
enum enumWeekday{Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday};缺省时,第一个枚举元素值为0,以后每个元素递增1. struct AddressBook{public string name;public string phone;public uint原创 2009-01-15 14:39:00 · 646 阅读 · 0 评论 -
stringBuilder类的使用方法
using System;using System.Collections.Generic;using System.Text;namespace ConsoleApplication5{ class Program { static void Main(string[] args) { // 使用指定的字符串和容量初始化 Stri原创 2009-01-17 20:07:00 · 689 阅读 · 0 评论 -
console.writeline 参数详细说明
using System;using System.Collections.Generic;using System.Text;namespace ConsoleApplication2{ class Program { static void Main(string[] args) { string comparison;原创 2009-01-16 11:16:00 · 4331 阅读 · 0 评论 -
逻辑运算符
&& 逻辑与运算|| 逻辑或运算! 逻辑非运算原创 2009-01-16 10:29:00 · 402 阅读 · 0 评论 -
c#转义字符含义
/ 单引号/a 感叹号/" 双引号/b 退格// 反斜杠/f 换页/r 回车/t 水平方向tab/n 换行/v 垂直方向tab/0 空字符原创 2009-01-15 14:30:00 · 5148 阅读 · 1 评论 -
this,base 在继承中的作用
using System;using System.Collections.Generic;using System.Text;namespace employees继承{ public class Employee { public int salary; public string haha; publi原创 2009-01-19 12:26:00 · 830 阅读 · 0 评论 -
程序多态的实现。
using System;using System.Collections.Generic;using System.Text;namespace ConsoleApplication8{ class Program { static void Main(string[] args) { Circ原创 2009-01-20 14:52:00 · 586 阅读 · 0 评论 -
Fieldset 与 Legend
http://www.52css.com/article.asp?id=490 http://www.silentash.com/blog/2009/128.html原创 2009-03-15 14:56:00 · 346 阅读 · 0 评论 -
麻烦的源代码
using System;using System.Collections.Generic;using System.Text;namespace ConsoleEvents2{ class Class1 { //声明一个委托 delegate FireEventHandler,delegate 没有 静态或实例 成员的说法原创 2009-01-29 21:17:00 · 359 阅读 · 0 评论 -
c#中令兔子头痛的。。。。
事件,不太会用。泛型(Generics),看不懂!!!!气死了。匿名方法(Anonymous method),同上。迭代器(Iterators),同上局部类(Partial Types) ,同上。。 这么多不懂,,,要加油好好学习。 找了一些泛型的链接http://www.cnblogs.com/laihua/archive/2006/11/15/5原创 2009-01-30 11:38:00 · 488 阅读 · 0 评论 -
转载(简单的事件)
using System;using System.Collections.Generic;using System.Text;namespace Simpliest{ class Class1 { public delegate void FireEventHandler(string s); public static e原创 2009-01-29 15:25:00 · 520 阅读 · 0 评论 -
推荐看几个 写 app.config的网址,挺不错的。
http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/8031ad0d-230e-446f-b2f9-ea09364ed2b0/ http://www.diybl.com/course/4_webprogram/asp.net/netjs/20071226/94028.html http://blog.原创 2009-02-01 17:55:00 · 466 阅读 · 0 评论 -
int.parse有啥用呢
使用Convert.ToInt32()把一个char型转换成int时,是把这个char的ascci码给过去而不是数字如:char c = 1;int i;i = Convert.ToInt32(c);//这时i的值为49,是1的ascii码想得到1,可以使用int.Parse()如:char c = 1;int i;i = int.Parse(c原创 2009-01-19 20:59:00 · 1941 阅读 · 0 评论 -
asp.net 动态表格生成1.
<!-- void Page_Load(Object sender, EventArgs e) { int numrows = int.Parse(DropDown1.SelectedItem.Value);///为啥用int.parse? int numcells = int.Parse(DropDown2.SelectedIte原创 2009-01-20 10:30:00 · 2356 阅读 · 0 评论 -
c#中委托是啥样的?
using System;using System.Collections.Generic;using System.Text;namespace ConsoleApplication9{ class Program { delegate void MyDelegate(); static void Main(strin原创 2009-01-20 16:38:00 · 490 阅读 · 0 评论