Choose how to group the blog entries:
Listed by date
Listed by category Summary
July, 2008
June, 2008
May, 2008
April, 2008
March, 2008
February, 2008
January, 2008
December, 2007
November, 2007
October, 2007
September, 2007
August, 2007
July, 2007
June, 2007
May, 2007
April, 2007
March, 2007
February, 2007
January, 2007
December, 2006
November, 2006
October, 2006
September, 2006
August, 2006
July, 2006
June, 2006
May, 2006
April, 2006
March, 2006
February, 2006
January, 2006
December, 2005
November, 2005
October, 2005
September, 2005
August, 2005
July, 2005
June, 2005
May, 2005
April, 2005
11/18/2007
做自己最擅长的事情。 做熟不做生。 技术也要适应需求才行。
11/8/2007
一:首先确认3306远程端口开启。
二:mysql默认不支持远连.必须设置。
如下:
root权限进入
mysql -u root -p 密码
use mysql;
update db set host = '%' where user = '用户名';
FLUSH PRIVILEGES;
退出.然后重启mysql. 上面的那个用户即可远连你的mysql了.
记得为了安全一定要有个where条件。
三:host:%表示你的数据库接受任何一个IP的访问,而如果明确访问方机器的IP,可以设置host:访问方IP,所以在网络物理连接的前提下,限制是否能连接到你的数据库跟你自身的IP地址无关。
11/5/2007
/**default css style**/ html, address , blockquote
, body, dd , div ,
dl, dt , fieldset , form ,
frame , frameset , h1, h2 ,
h3 , h4 , h5, h6 , noframes
, ol, p , ul , center
, dir, hr , menu , pre
{ display : block } li {
display : list - item } head {
display : none } table { display :
table } tr { display : table -
row } thead { display : table -
header - group } tbody { display
: table - row - group }
tfoot { display : table - footer -
group } col { display : table
- column } colgroup { display : table
- column - group } td,
th { display : table - cell ;
} caption { display : table -
caption } th { font - weight :
bolder ; text - align : center }
caption { text - align : center }
body { margin : 8px ; line
- height : 1.12 } h1
{ font - size : 2em ; margin
: .67em 0 } h2
{ font - size : 1.5em ;
margin : .75em 0 }
h3 { font - size : 1.17em
; margin : .83em 0 }
h4, p , blockquote, ul
, fieldset, form , ol, dl
, dir , menu { margin :
1.12em 0 } h5 { font
- size : .83em ; margin :
1.5em 0 } h6 { font
- size : .75em ; margin :
1.67em 0 } h1,
h2 , h3 , h4 , h5,
h6 , b , strong { font -
weight : bolder } blockquote { margin -
left : 40px ; margin - right
: 40px } i, cite
, em , var , address {
font - style : italic } pre,
tt , code , kbd, samp {
font - family : monospace } pre {
white - space : pre } button,
textarea , input, object ,
select { display : inline - block
; } big { font - size
: 1.17em } small,
sub , sup { font - size :
.83em } sub { vertical
- align : sub } sup
{ vertical - align : super
} table { border - spacing :
2px ; } thead, tbody
, tfoot { vertical - align : middle
} td, th { vertical - align
: inherit } s, strike ,
del { text - decoration : line
- through } hr { border :
1px inset } ol, ul , dir
, menu, dd { margin - left
: 40px } ol { list
- style - type : decimal
} ol ul, ul ol , ul ul, ol ol
{ margin - top : 0 ; margin
- bottom : 0 } u
, ins { text - decoration : underline
} br: before { content :
"\A" } : before ,
: after { white - space :
pre - line } center { text -
align : center } abbr, acronym {
font - variant : small - caps ;
letter - spacing : 0.1em }
: link , : visited {
text - decoration : underline } :
focus { outline : thin dotted invert } /* Begin bidirectionality settings (do not change) */
BDO[ DIR = "ltr" ]
{ direction : ltr ; unicode - bidi
: bidi - override } BDO[
DIR = "rtl" ] { direction :
rtl ; unicode - bidi : bidi -
override } *[ DIR = "ltr"
] { direction : ltr ; unicode
- bidi : embed } *[ DIR
= "rtl" ] { direction : rtl
; unicode - bidi : embed } @media
print { h1 { page - break
- before : always } h1, h2
, h3 , h4, h5 , h6 {
page - break - after : avoid
} ul, ol , dl { page
- break - before : avoid }
}
从net2ftp 里面拔下来的 function sendDownloadHeaders($filename, $filesize) { // -------------- // This function sends download headers to the browser // -------------- // -------------------------------------------------------------------------
// Global variables // ------------------------------------------------------------------------- global $net2ftp_globals; // -------------------------------------------------------------------------
// Clean the input, and encode the filename with htmlentities // ------------------------------------------------------------------------- $filename = trim($filename); $filename_html = htmlEncode3($filename);
///htmlEncode3 就是使用 @htmlentities($string, ENT_QUOTES, "UTF-8"); // ------------------------------------------------------------------------- // Check which is the content type and disposition
// ------------------------------------------------------------------------- $content_type = getContentType($filename); $content_disposition = "attachment"; if (strpos($filename, ".zip") !== false) { $content_disposition = "inline"; }
// ------------------------------------------------------------------------- // Send the headers - Internet Explorer // From PhpMyAdmin
2.8.0.2 file export.php // ------------------------------------------------------------------------- header("Content-Type: " . $content_type); header("Expires: " . gmdate("D, d M Y H:i:s") . " GMT");
if ($net2ftp_globals["browser_agent"] == "IE") { header("Content-Disposition: $content_disposition; filename=\"" . $filename_html . "\""); header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Pragma: public"); } else { // Firefox needs an asterisk to enable filenames with special characters header("Content-Disposition: $content_disposition; filename*=\"" . $filename_html . "\"");
header("Pragma: no-cache"); } header("Content-Description: $filename_html"); header("Content-Length: $filesize"); header("Connection: close");
} // End function sendDownloadHeaders Modified httpheaders.inc.php @ 166 to: // Check which is the content type and disposition // -------------------------------------------------------------------------
header("Content-type: application/force-download"); header("Content-Disposition: attachment; filename = ".basename($filename)); header("Content-Transfer-Encoding: binary");
readfile("$filename"); } // End function sendDownloadHeaders 在phpMyAdmin 2.11 版本 export.php 341 if (! empty
( $content_encoding )) {
342 header ( 'Content-Encoding: ' . $content_encoding );
343 }
344 header ( 'Content-Type: ' . $mime_type );
345 header ( 'Expires: ' . gmdate ( 'D, d M Y H:i:s' ) . ' GMT' );
346 // lem9: Tested behavior of
347 // IE 5.50.4807.2300
348 // IE 6.0.2800.1106 (small glitch, asks twice when I click Open)
349 // IE 6.0.2900.2180
350 // Firefox 1.0.6
351 // in http and https
352 header ( 'Content-Disposition: attachment; filename="' . $filename . '"' );
353 if ( PMA_USR_BROWSER_AGENT == 'IE' ) {
354 header ( 'Cache-Control: must-revalidate, post-check=0, pre-check=0' );
355 header ( 'Pragma: public' );
356 } else {
357 header ( 'Pragma: no-cache' );
358 } 中文文件名 对于IE6 要用HttpServerUtility.UrlEncode() , Firefox 2 不需要。
10/15/2007
标 题: Re: 12星座下半年幸运之星全方预报 发信站: 饮水思源 (2007年10月15日11:33:46 星期一), 站内信件 魔羯座 金光大PK:综合运 避免产生金钱纠纷 魔羯座下半年要特别注意的是财运,借钱给被人或是合伙之类的事情很 容易引起重 大的纠纷,甚至血本无归,所以在处理金钱的问题时应该要特别保守小心,才能避免不 必要的困扰。
也许你会感觉到运势慢慢在上升,但还不到你可以强出头的时候,等到年底或是明 年初在做重大的决定。在健康的部分,应该要小心各类的运动伤害,特别是暖身不足的 话很容易会抽筋或拉伤。 金光大PK:工作、学业运 小不忍则乱大谋 下半年维持在一个稳定的状态,虽称不上强运,但也不坏,整体来说并不会出现重 大的危机,10月开始波折会多一点,这个时候你需要更多的耐性,而且要花一些心思在
搞定人际关系,只要能找到适当的人帮你解决适当的问题,很多事情都可以顺利的解决 ,11月中是一个重要的转折点,只需要足够的耐心,就能度过难关! 评审讲评: 看似平淡的日子,其实将影响深远,耐心与毅力将是突破难关的制胜武器。 运势复活小提醒: 幸运数字★3 幸运场所★服饰店 幸运星座★双鱼座 黑色数字★8
远离场合★法院 扫把星座★天蝎座
10/13/2007
魔羯座08年的关键词是 开运年 明年木星在魔羯座,还是有幸运的因素在里边。魔羯座要拿出来,跟木星在射手座不同,对他们来说,开运就是要开始运气的意思。明年魔羯座的爱情运蛮好的,所以不要闷在家,出去玩一下。魔羯座明年桃花运是80分。 魔羯座的贵人星座是白羊座,小人星座是天秤座。
8/30/2007
【原文地址】Tip/Trick: Url Rewriting with ASP.NET http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx
【原文发表日期】 Monday, February 26, 2007 9:27 PM
原文地址:http://www.yaosansi.cn/blog/article.asp?id=1031 经常有人请我指导应该如何动态地"重写"URL,以在他们的ASP.NETweb应用中发布比较干净的URL端点。这个博客帖子概述了几个方法,你可以用来在ASP.NET中干净地映射或重写URL,以及按照你自己的需求组织你的URL的结构。
为什么URL映射和重写很重要?
下面是开发人员想要对URL有更大的灵活性的最常见的场景:
1) 处理这样的情形:你要更改你的web应用中网页的结构,但你同时也要确保在你移动网页后,那些被人收藏的老URL不会成为死链接。重写URL允许你透明地将请求转交到新的网页地址而不出错。
2) 在象Google,Yahoo 和 Live
这样的搜索引擎中提高你网站上网页的搜索相关性。具体地来说,URL重写经常能使你在你网站上网页的URL里更加容易地嵌入关键词,这么做往往会增加别人
点击你的链接的机会。从使用查询字符串参数到使用完全限定(fully
qualified)的URL也能在某些情形下提高你在搜索引擎结果中的优先顺序。使用强制referring链接使用同样的大小写(same
case)和URL入口(譬如,使用weblogs.asp.net/scottgu 而不是
weblogs.asp.net/scottgu/default.aspx) 的技术也能避免因跨越多个URL而造成的网页排名(pagerank)的降
低(avoid diluting your pagerank across multiple URLs),从而增加你的搜索结果。
在一个搜索引擎日渐驱动网站访问量的世界里,在你的网页排名上稍微得到一些提高就能给你的业务带来不错的投资回报(ROI)。逐渐地,这驱使开发人
员使用URL重写以及其他SEO(搜索引擎优化
)技术来优化网站(注,SEO是个步调很快的空间,增加你的搜索相关性的建议月月在演变)。想了解一些关于搜索引擎优化方面好的建议的话,我建议你阅读一
下《SSW Rules to Better Google Rankings
(SSW的提高Google排名之要领)》,以及MarketPosition关于《how URLs can affect top search
engine ranking (URL会如何影响顶级搜索引擎排名)》的文章。 例程的URL重写场景
为这个博客贴子起见,我将假设我们将在一个应用里建造一套电子商务的产品目录网页,产品是按种类来组织的(譬如,图书,录像,CD,DVD等等)。
让我们假定一开始我们有个网页叫Products.aspx,通过查询字符串参数接受一个类别名称,相应地过滤显示的产品。与这个Products.aspx网页对应类别的URL看上去象这样:http://www.store.com/products.aspx?category=books
http://www.store.com/products.aspx?category=DVDs http://www.store.com/products.aspx?category=CDs
但我们不想使用查询字符串来呈示每个类别,我们想修改应用,让每个产品类别对搜索引擎来说看上去象是一个独特的URL,并且在实际的URL中嵌入关
键词(而不是通过查询字符串参数)。我们将在这个博客帖子剩下来的篇幅里,讨论一下达成这个目的我们可以采取的4种不同方法。
方法一:使用Request.PathInfo 参数而不是查询字符串
我将示范的第一个方法根本不使用URL重写,而是使用ASP.NET中不太为人所知的一个特性,Request的PathInfo属性。为帮助解释这个属性的有用之处,考虑一下我们电子商店下面这些URL的情形: http://www.store.com/products.aspx/Books
http://www.store.com/products.aspx/DVDs http://www.store.com/products.aspx/CDs
你会在上面这些URL中注意到的一个东西是,他们不再含有查询字符串值,取而代之的是,类别参数的值是附加到URL上的,是以
Products.aspx网页处理器名称之后的/参数 值的方式出现的。然后,一个自动化的搜索引擎爬虫(search engine
crawler)会把这些URL解释成三个不同的URL,而不是一个URL带有三个不同的输入值
(搜索引擎是不理会文件扩展名的,只把它当作URL中的另一个字符而已)。
你也许很想知道怎么在ASP.NET中处理这个附加的参数的情形。好消息是,这非常简单。只要使用Request的PathInfo属性就可以了,
该属性返回URL中紧随 products.aspx 后面的那部分内容。所以,对上面这些URL, Request.PathInfo会分别返回
"/Books", "/DVDs",和 "/CDs"(万一你想知道的话, Request的Path 属性返回"/products.aspx"
)。
然后,你可以轻易地编写一个函数来获取产品类别,象这样(下面这个函数去除前面的斜杠字符,只返回"Books","DVDs",或 "CDs"):
Function GetCategory() As String
If (Request.PathInfo.Length = 0) Then Return "" Else Return Request.PathInfo.Substring(1) End If
End Function
样例下载:我建立的一个展示这个技术的样例应用可以在这里下载。这个样例和这个技术的很好的地方在于,为部署使用这个方法的ASP.NET应用,不需作任何服务器配置改动。在共享主机的环境里,这个技术也行之有效。 方法二:使用HttpModule实现URL重写
上述Request.PathInfo技术的替换方法是,利用ASP.NET提供的HttpContext.RewritePath方法。这个方法允许开发人员动态地重写收到的URL的处理路径,然后让ASP.NET使用刚重写过后的路径来继续执行请求。
譬如,我们可以选择向大众呈示下列URL:
http://www.store.com/products/Books.aspx http://www.store.com/products/DVDs.aspx
http://www.store.com/products/CDs.aspx
在外界看来,网站上有三个单独的网页(对搜索爬虫而言,这看上去很棒)。通过使用
HttpContext的RewritePath方法,我们可以在这些请求刚进入服务器时,动态地把收到的URL重写成单个Products.aspx网
页接受一个查询字符串的类别名称或者PathInfo参数。譬如,我们可以使用Global.asax中的
Application_BeginRequest事件,来这么做: void Application_BeginRequest(object sender, EventArgs e) {
string fullOrigionalpath = Request.Url.ToString(); if (fullOrigionalpath.Contains("/Products/Books.aspx")) { Context.RewritePath("/Products.aspx?Category=Books");
} else if (fullOrigionalpath.Contains("/Products/DVDs.aspx")) { Context.RewritePath("/Products.aspx?Category=DVDs"); } }
手工编写象上面这样的编码的坏处是,很枯燥乏味,而且容易犯错。我建议你别自己写,而是使用网上现成的HttpModule来完成这项工作。这有几个你现在就可以下载和使用的免费的HttpModule: UrlRewriter.net UrlRewriting.net
这些模块允许你用声明的方式在你应用的web.config文件里表达匹配规则。譬如,在你应用的web.config文件里使用
UrlRewriter.Net模块来把上面的那些URL映射到单个Products.aspx页上,我们只要把这个web.config文件添加到我们
的应用里去就可以了(不用任何编码):
<?xml version="1.0"?>
<configuration>
<configSections> <section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler
, Intelligencia.UrlRewriter" /> </configSections> <system.web> <httpModules> <add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule
, Intelligencia.UrlRewriter"/> </httpModules> </system.web>
<rewriter> <rewrite url="~/products/books.aspx" to="~/products.aspx?category=books" /> <rewrite url="~/products/CDs.aspx" to="~/products.aspx?category=CDs" />
<rewrite url="~/products/DVDs.aspx" to="~/products.aspx?category=DVDs" /> </rewriter> </configuration>
上面的HttpModule URL重写模块还支持正则表达式和URL模式匹配(以避免你在web.config
文件里硬写每个URL)。所以,不用写死类别名称,你可以象下面这样重写匹配规则,把类别名称动态地从任何/products/[类别].aspx组合的
URL里取出来:
<rewriter> <rewrite url="~/products/(.+).aspx" to="~/products.aspx?category=$1" /> </rewriter>
这使得你的编码极其干净,并且扩展性非常之好。
样例下载:我建立的一个使用UrlRewriter.Net模块展示这个技术的样例应用可以在这里下载。
这个样例和这个技术的很好的地方在于,为部署使用这个方法的ASP.NET应用,不需作任何服务器配置改动。在设置为中等信任安全等级
(medium trust)的共享主机的环境里,这个技术也行之有效 (只要把文件FTP/XCOPY到远程服务器就可以了,不需要安装)。 方法三:在IIS7中使用HttpModule 实现无扩展名的URL重写
上述的HttpModule方法在你要重写的URL含有.aspx 扩展名或者包含另一个被设置为ASP.NET处理的扩展名的情形下一切都工作。你这么做的话,不需要任何特定的服务器配置,你只要把你的应用拷贝到远程服务器,它会正常工作的。
但有的时候,你要重写的URL要么拥有一个不为ASP.NET处理的文件扩展名(譬如, .jpg, .gif, 或 .htm),要么根本没有扩展名。譬如,我们也许要把这些URL呈示成公开的产品目录网页(注意,它们没有 .aspx 扩展名):
http://www.store.com/products/Books http://www.store.com/products/DVDs
http://www.store.com/products/CDs
在 IIS5 和 IIS6 中,使用ASP.NET处理上面这样的URL不是很容易。 IIS 5/6
使得在ISAPI扩展(ASP.NET就是这样一个扩展)里非常难以重写这些类型的URLS。你需要做的是使用ISAPI过滤器在IIS请求管道
(request pipeline)的较早期实现重写。我将在下面的第四个方法里示范如何在 IIS5/6 实现这样的重写。
但好消息是, IIS 7.0使得处理这类情形容易之极。你现在可以在 IIS
请求管道的任何地方执行一个HttpModule,这意味着你可以使用上面的URLRewriter 模块 来处理和重写无扩展名的URL(甚至是带有
.asp,.php,或 .jsp 扩展名的URL)。下面示范了你在IIS7中该如何配置:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<configSections> <section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler
, Intelligencia.UrlRewriter" /> </configSections> <system.web> <httpModules> <add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule
, Intelligencia.UrlRewriter" /> </httpModules> </system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"> <add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule" /> </modules>
<validation validateIntegratedModeConfiguration="false" />
</system.webServer>
<rewriter> <rewrite url="~/products/(.+)" to="~/products.aspx?category=$1" /> </rewriter> </configuration>
注意一下<system.webServer>内<modules>部分设置为true的
runAllManagedModulesForAllRequests属性。这个属性确保来自Intelligencia的
UrlRewriter.Net模块(是在IIS7正式发布前编写的),会被调用,有机会重写到服务器的所有URL请求(包括文件夹)。上面的
web.config文件非常酷之处在于:
1) 它在任何IIS7机器上都会工作,你不需要管理员在远程主机上启用任何东西,它也能在设置为中等信任安全等级(medium trust)的共享主机的环境场景下工作。
2) 因为我在<httpModules>和 IIS7 的<modules>
部分同时配置了UrlRewriter,我既能在
VS内置的web服务器(即Cassini)中,也能在IIS7下使用同样的URL重写规则。两者完全支持无扩展名的URL重写。这使得测试和开发非常容
易。
IIS 7.0 将在今年的晚些时候作为Windows
Longhorn服务器的一部分发布,将在几个星期内随Beta3版本的发布支持go-live许可。由于添加到IIS7中的所有的新宿主
(hosting)特性,我们预期主机供应商将会非常快地开始积极提供IIS7账号,这意味着你应该很快就可以开始利用上述的无扩展名的URL重写支持。
我们将在 IIS7 RTM
时段里发布一个为微软所支持的URL重写模块,该模板是免费的,你可以在IIS7上使用,并且这模块将对你web服务器上的所有内容的高级URL重写场景
提供很好的支持。
样例下载:我建立的一个使用IIS7和UrlRewriter.Net模块展示无扩展名URL重写技术的样例应用可以在这里下载。
8/23/2007
http://www.cnblogs.com/doraeimo/archive/2007/01/01/609344.html
如何为gridview控件里的"删除"列添加一个确认对话框?网上众说纷纭,大致见到了三种解决方案,现归纳如下: 1、继承Web.IO里的button控件,为其实现一个IPostback的接口用于回调,具体代码之复杂,只有作者自己想体会吧…… 2、
在gridview的ItemCreated事件中,遍历所有控件,若属于LinkButton类,且CommandName为"Delete",就将其
添加一个属性,具体做法是将遍历到的Control强制类型转化为LinkButton,然后调用其Atributes.Add方法,添加一个
onclick事件内含confirm语句,即
lb.Attributes.Add( " onclick "
, " return confirm('您真的要删除此行吗?') " );
3、目前已知的最简洁的方法 ,如图,在删除按钮的那一列属性里面,把DeleteText属性设为
< div id = " de
" onclick = "
JavaScript:return confirm('确定删除吗?') " > 删除
</ div >
这个太强了,赞一个。 可问题是,.net输出的html代码如下:
< a href ="javascript:__doPostBack('ctl00$ContentPlaceHolder1$GridView1','Delete$0')"
style ="color:#4A3C8C;" >< div
id ="de" onclick ="JavaScript:return confirm('确定删除吗?')"
> 删除 </ div
></ a >
为什么内层<div>的onclick事件所返回的bool值能影响到外层<a>标签的的语句是否被执行呢?
仔细想了想,以前用asp直接写的删除标签是这个样子的:
< a href ="deleteUser.asp?id=xxx"
onclick ="return confirm('确定删除吗?')" > 删除
</ a >
也就是说,onclick事件接受一个bool值,其决定了click事件是否被触发。若click事件没有被触发,href内含的跳转动作就不会生效。
同理,之前的那段代码中,<div>在<a>中,只有先触发<div>的click事件,<a>的跳转
动作才会生效。而我们在<div>的onclick事件中若选择为其赋值false,随即取消了<div>的click事件,也
同时取消了<a>的跳转。
之后,新的问题又来了。如果我们的CommandField中ButtonType是Button的话,这段代码就失效了。我想了下,可以通过将其转换为模板列的方式来解决。
先将该字段转换成模板,然后编辑这个模板列,选中用于删除的Button,将其onClientClick属性设为
return confirm('您确认删除要删除么?')
即可。
8/12/2007
uk2太贵,用英镑结算的, 2:1对美元。 cookie 花 11 US$ 买了一年的。 发现site5的还不错
24 Months (2 Years - Best Value!) $5.00/m
8/9/2007
xaml中定义的 <src:myType x:Name="myTypeName" > 可以在code中用myTypeName"来访问 。
<Grid.Resources> <c:NetIncome x:Key="incomeDataSource"/> *****
<Grid.DataContext> <Binding Source="{StaticResource incomeDataSource}"/> </Grid.DataContext>
//LeagueList is a collection of Leagues <Window.Resources> <ObjectDataProvider x:Key="MyList" ObjectType="{x:Type src:LeagueList}" />
<DockPanel DataContext="{Binding Source={StaticResource MyList}}">
想把在code中的对象赋予xaml中的property,可以直接在code中做
MyData myDataObject = new MyData(DateTime.Now); Binding myBinding = new Binding("MyDataProperty"); myBinding.Source = myDataObject; myText.SetBinding(TextBlock.TextProperty, myBinding);
Q: What is the difference between \n and \r\n ? Should I be concerned about the differences ? What types of characters indicate a new line ? A:
Background There are a few characters which can indicate a new line. The usual ones are these two: "\n" or 0x0A (10 in decimal)
This character is called "Line Feed" (LF). "\r" or 0x0D (13 in decimal) This one is called "Carriage return" (CR) Different Operating Systems handle newlines in a different way. Here is a short list of the most common ones:
DOS and Windows They expect a newline to be the combination of two characters, namely "\r\n" (or 13 followed by 10). Unix (and hence Linux as well)
Unix uses a single "\n" to indicate a new line. Mac Macs use a single "\r". This difference gives rise to a number of problems. For example, a file created under Unix (so with newlines as a single LF) will not open correctly under Window's Notepad. Any Windows program that expects newlines to be CRLF will not work correctly with these files.
To unify things a bit, so that writing portable C/C++ programs is possible, file streams have both a "translated" and an "untranslated" mode. If you open a file in translated mode, the runtime library will convert a "\n" to the appropriate newline character(s). If the following program is compiled under Unix, the file will contain a single LF to indicate the newline. If it's compiled under windows, it will contain a CRLF.
So file streams are handled in a transparent way, provided of course that you only handle files compatible with your operating system. But many times you have to pass multi-line strings directly to some system functions.
如果 aspx中没有给SqlDataSource 硬编码 SelectCommand 。会在分页后出现空白。
如果硬编码了,分页会把新的SelectCommand丢掉,还使用原来SelectCommand。
出于安全原因,SelectCommand 属性不存储在视图状态中。由于在
客户端上可以对视图状态的内容进行解码,因此将有关数据库结构的敏感信息存储在视图状态中会导致产生信息泄漏漏洞。
因此,你改写了SelectCommand属性,postback后他又恢复到原先的值了,protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e) { //GridView1.PageIndex =
e.NewPageIndex; //binddata();这个地方要绑定下你的数据. }
8/8/2007
作者:清清月儿http://blog.csdn.net/21aspnet/archive/2007/03/25/1540301.aspx
快速预览: GridView无代码分页排序 GridView选中,编辑,取消,删除 GridView正反双向排序 GridView和下拉菜单DropDownList结合 GridView和CheckBox结合 鼠标移到GridView某一行时改变该行的背景色方法一 鼠标移到GridView某一行时改变该行的背景色方法二 GridView实现删除时弹出确认对话框
GridView实现自动编号 GridView实现自定义时间货币等字符串格式 GridView实现用"..."代替超长字符串 GridView一般换行与强制换行 GridView显示隐藏某一列 GridView弹出新页面/弹出新窗口 GridView固定表头(不用javascript只用CSS,2行代码,很好用)
GridView合并表头多重表头无错完美版(以合并3列3行举例) GridView突出显示某一单元格(例如金额低于多少,分数不及格等) GridView加入自动求和求平均值小计 GridView数据导入Excel/Excel数据读入GridView
7/31/2007
理解枚举类型很有作用, 可以看看 C语言 的教材 , 虽然我大一c考了 90多分,但是都是很皮毛的东西。
7/19/2007
亚洲三流顺利出局,猪家军回国平抑肉价
7/3/2007
fuck 他们两家公司 。 老外的陷阱真他妈的多!!!!!! 有paypal的最好把信用卡删除,等要用paypal的时候再填上去。 然后在paypal的用户信息里面把结算协议也给全部取消。。
6/30/2007
我想我应该增加自己的信息。调整好心态。 要学会好的生活心态。毕竟我还是 Newbie 。 不要给自己压力 明天给家里打个电话。一定要打!!
6/20/2007
有的时候在网上用paypal购买了一些服务(domain hosting) 有的在服务周期过了以后会自动从paypal扣款。 所以我们要关闭掉 PayPal subscription! 方法如下: When you log into Paypal: 1). Click on "All Activity" 2). Pull down the dropdown that says "Show:" and choose "Subscriptions" 3). Enter a date range that include when you started the subscription Then, you can click on the active subscription and cancel it. 中文的就是 1.登录帐号 2.点 所有账户活动 在 显示: 中选择 租用 3.再选择时间段,点搜索。 这时就可以看到激活的 租用了,取消他! 参考http://www.webhostingtalk.com/showthread.php?t=510899&highlight=jvds.com
6/2/2007
每天的时间安排出现了些问题,心态也不好了。 上网的时候就无聊,不知道要干什么些什么,又不愿意打开Vis