木子屋 Dnawo's BLOG

2011-03 归档

共 18 篇

ASP.NET页面Form嵌套解决方法

Default.aspx: 客户端代码: form1是ASP.NET自带的,由于它的存在,form2无法正常提交,点击submit按钮,表单将提交到Default.aspx页面(form3,form4能正常提交),解决方法如下:

C#解析"a=1&b=2&c=3"字符串

若该字符串是使用Http Get发送,url?a=1&b=2&c=3,使用下边代码即可获取参数a的值: 若该字符串是远程接口返回,以前都是用Split函数去拆分,今天发现一个非常强大的方法ParseQueryString,简单多了:

Twitter发布图片的方法

If you'd like to share a photo or video on Twitter, it must first be uploaded to a third-party website, as Twitter does not currently host any content other than Tweets. Most of these sites will allow you the option to post your photo or video directly to Twitter, with the option to add a message if you want. Alternately, you can copy and paste their link to your photo or video into your Tweet on Twitter.com. Links to photos and videos from the sites listed here will display your media in Twitter's details pane so that your followers can see your picture or video without leaving their timeline. Twitter本身只能添加文本内容,如果你想添加图片或视频,可以通过第三方网站来完成。这些网站大都是Twitter的第三方应用,你可以在上边上传图片或视频并发布到Twitter中,并且它们能在Twitter中直接显示出来。…

"神秘"的换行

下午调试一段程序时出现了奇怪的问题,有个记事本文件内容如下: 程序读取后显示却换行了: 后来想到用UE打开看了下,发现文本之间只有换行符(0A),没有回车符(0D),而Windows记事本必须回车换行同时使用才会显示换行,看来眼见未必为实

Chrome扩展程序Proxy Switchy!配置示例

如上图所示,Switchy提供了两种模式来连接网络:①使用特定的代理服务器;②自动切换,下边我们就来说说它们是怎么配置的。 ①.使用特定的代理服务器 在Switchy的Options界面中切换到"Proxy Profiles"选项卡,这边可以添加多个代理服务器,到时在图片中①处都会列出来。使用这种模式时,不管打开什么站点,都是使用代理服务器来连接网络。 说明:Windows7下测试发现,使用这种模式时IE8会受影响也使用代理连接网络。官方说明: Chrome uses system's proxy settings (IE proxy settings on Wndows) because it doesn't have its own proxy settings yet (see http://crbug.com/266).…