代码改变世界

自定义 DataList 显示数据行数的方法

2013-03-24 15:24 by ATP_, 468 阅读, 0 推荐, 收藏, 编辑
摘要:PEAEWebSiteDataContext context = new PEAEWebSiteDataContext(); var p = from n in context.tb_News where n.cname == "校园信息" select n; var pp = p.OrderByDescending(tb_News=>tb_News.issuedate).Take(1);var p1 = from n in context.tb_News ... 阅读全文

解决使用MasterPage后,Page.FindControl方法找不到指定控件的问题

2013-03-09 17:44 by ATP_, 914 阅读, 1 推荐, 收藏, 编辑
摘要:转自:http://blog.csdn.net/mengkun2010/article/details/29798641. 首先来了解以下FindControl的工作原理:在ASP.NET 2.0中,引入了MasterPage的机制,在当前页使用MasterPage的情况下,放在 ContentPlaceholder1这样的内容页的控件无法用Page.FindControl来查找,原因何在?MSDN对FindControl的解释:在当前的命名容器中搜索带指定id参数的服务器控件这里有一篇文章阐述阐述FindControl方法和INamingContainers接口:http://www.ode 阅读全文

ASP.NET获取客户端IP地址、系统版本、浏览器版本

2013-03-08 16:48 by ATP_, 783 阅读, 0 推荐, 收藏, 编辑
摘要:转自: http://blog.sina.com.cn/s/blog_40d62aad0100hjic.html//获取浏览器版本号public string getBrowser() {string browsers;HttpBrowserCapabilities bc = HttpContext.Current.Request.Browser;string aa = bc.Browser.ToString();string bb = bc.Version.ToString();browsers = aa + bb;return browsers;}//获取客户端IP地址public str 阅读全文

Asp.net网站发布至IIS( vs2010 )

2013-03-05 15:25 by ATP_, 1259 阅读, 0 推荐, 收藏, 编辑
摘要:1.在VS2010中右击项目名称,点击生成部署包。2.在当前文件夹下找到obj-debug-package-以项目名命名的压缩包3.打开iis,在网站子栏中随便选中一个网站。4.在右侧的操作中点击导入应用程序。 阅读全文

C#模糊查询Access(转)

2012-11-09 08:33 by ATP_, 650 阅读, 0 推荐, 收藏, 编辑
摘要:在c#对access操作时,调了挺简单的模糊查询语句"select*fromnewswheretitlelike'%test%'orderbyaddtimedesc",总返回0结果。经网上查,其中一个原因是因为access数据库ansi编码,ansi89支持通配符"*",而ansi92支持通配符“%",我用的是access2000,转换成2003后同样只能用”*",也不知道ansi编码在哪里设置,不过好在用access里的查询可以得到要的结果了。但在c#中执行“select*fromnewswheretitlelike 阅读全文

包含图片,复选框的ListView(转)

2012-09-23 10:51 by ATP_, 545 阅读, 0 推荐, 收藏, 编辑
摘要:项目要用到一个listview,要求是可以显示图片,后面还有有复选框。先新建一个MyAdapter类,继承自BaseAdapter。在MyAdapter中实现对数据的绑定,我这儿由于是测试的,所以把数据写死了。Java代码packagecom.zwq.umeng; importjava.util.ArrayList; importjava.util.HashMap; importjava.util.List; importjava.util.Map; importandroid.content.Context; importandroid.view.LayoutInflater; impo.. 阅读全文

模拟自动向网页Post信息并都接受信息进行处理---C#实现

2012-09-17 20:12 by ATP_, 372 阅读, 0 推荐, 收藏, 编辑
摘要:class Post { /// <summary> /// 向目标网页发送数据 /// </summary> /// <param name="url">目标页</param> /// <param name="postData">数据</param> /// <param name="encodeType">编码格式</param> /// <param name="err">错误信息</param 阅读全文

常用HTML标记

2012-09-13 19:47 by ATP_, 659 阅读, 0 推荐, 收藏, 编辑
摘要:一.6个可以放在<head>内的标签 1.<meta>:各种属性介绍 keywords:向搜索引擎说明页面的关键字,content后输入供搜索的具体关键字。 <meta name="keywords" content="haha, hehe"> description:向搜索引擎描述页面的主要内容,通向在content中进行描述。 <meta name="description" content="这里输入对页面的相关描述"> author:向页面说明设计者的姓名。 阅读全文

【菜鸟做水题】:杭电 find your present(用异或的解题思想)

2012-09-03 21:30 by ATP_, 326 阅读, 0 推荐, 收藏, 编辑
摘要:Problem DescriptionIn the new year party, everybody will get a "special present".Now it's your turn to get your special present, a lot of presents now putting on the desk, and only one of them will be yours.Each present has a card number on it, and your present's card number will b 阅读全文

【菜鸟做水题】:杭电 hide handkerchief (辗转相除判断2数互质)

2012-09-03 20:28 by ATP_, 284 阅读, 0 推荐, 收藏, 编辑
摘要:Problem DescriptionThe Children’s Day has passed for some days .Has you remembered something happened at your childhood? I remembered I often played a game called hide handkerchief with my friends.Now I introduce the game to you. Suppose there are N people played the game ,who sit on the ground form 阅读全文
上一页 1 2 3 4 5 6 ··· 11 下一页