厲害厲害
...
Read more.
分享使用微軟開發工具及工作上會遇到的疑難雜症
2007-05-24
[+/-] : 大師級的廣告果然就是不一樣
2007-05-20
[+/-] : 餅乾Logo產生器
轉貼:免費資源網路社群

Read more.

bokstavskex 網站提供免費的餅乾風格Logo製作,支援英文 A-Z 的二十六個英文字母,只要在第一行填入欲產生的字串,第二行則是產生後圖片的高度,設定完後點選 Submit 即可產生一個餅乾風格的圖片,非常有趣。
【網站網址】http://bokstavskex.framtid.nu/agi.asp
轉出的照片另存時選所有檔案,並把檔名改為.gif即可...Read more.
2007-05-06
[+/-] : 如何於VS2005使用RssToolkit
把RssToolkit.dll放到專案Bin目錄
下載檔案
在專案中引用此DLL


再來就可以在專案中用到這二個Controls, RssDataSource, RssHyperLink
RssDataSource用法
加入一個DataList和一個RssDataSource
到屬性RssDataSource內容更改
MaxItems要顯示的筆數,預設值為0,表示無限大
Url就是rss的位置或是Atom
這裡要注意一下,一般rss都有一個叫rss.xml的檔案
可是google的blog是用atom原本給的網址是
http://lovetoknowgoogleandmstech.blogspot.com/feeds/posts/default
不知為何,一定要改成下面這一個才可以成功被rsstoolkit control引用
http://lovetoknowgoogleandmstech.blogspot.com/feeds/posts/default?alt=rss
DataList裡面編輯樣板加入一個超連結
Text連繫到title, NavigateUrl連繫到link
完成圖

...下載檔案
在專案中引用此DLL


再來就可以在專案中用到這二個Controls, RssDataSource, RssHyperLink
RssDataSource用法
加入一個DataList和一個RssDataSource
到屬性RssDataSource內容更改
MaxItems要顯示的筆數,預設值為0,表示無限大
Url就是rss的位置或是Atom
這裡要注意一下,一般rss都有一個叫rss.xml的檔案
可是google的blog是用atom原本給的網址是
http://lovetoknowgoogleandmstech.blogspot.com/feeds/posts/default
不知為何,一定要改成下面這一個才可以成功被rsstoolkit control引用
http://lovetoknowgoogleandmstech.blogspot.com/feeds/posts/default?alt=rss
DataList裡面編輯樣板加入一個超連結
Text連繫到title, NavigateUrl連繫到link
完成圖

Read more.
2007-05-03
[+/-] : 一些關於Silverlight 的新消息
微軟在2007/04/30更新了Silverlight官方網站,其網址如下:
http://silverlight.net/
Read more.
http://silverlight.net/
Sliverlight 1.0 & 1.1下載網址:
http://www.microsoft.com/silverlight/downloads.aspx
Read more.
2007-04-30
[+/-] : ASP.NET 2.0 圖片驗證
使用方法:
在需要它的頁面html裡添加
<img src="identifyingcode.aspx" />
後端CS
HttpCookieCollection cookies = Request.Cookies;
string tmp = cookies["ImageV"].Value;
然後比tmp與獲取的較驗證碼文本框中的值是否相同
後端VB
Dim cookies As HttpCookieCollection = Request.Cookies
Dim tmp As String = cookies("ImageV").Value
此寫法雖然是cs寫法,但是用在vb專案直接叫用此頁面即可
identifyingcode.aspx
直接寫到identifyingcode.aspx.cs即可,前端不做任何事
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
public partial class identifyingcode : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string tmp = RndNum(4);
HttpCookie a = new HttpCookie("ImageV", tmp);
Response.Cookies.Add(a);
this.ValidateCode(tmp);
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
public partial class identifyingcode : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string tmp = RndNum(4);
HttpCookie a = new HttpCookie("ImageV", tmp);
Response.Cookies.Add(a);
this.ValidateCode(tmp);
}
private void ValidateCode(string VNum)
{
Bitmap Img = null;
Graphics g = null;
MemoryStream ms = null;
private void ValidateCode(string VNum)
{
Bitmap Img = null;
Graphics g = null;
MemoryStream ms = null;
int gheight = VNum.Length * 12;
Img = new Bitmap(gheight, 25);
g = Graphics.FromImage(Img);
//背景颜色
g.Clear(Color.LightSteelBlue);
//文字字体
Font f = new Font("Arial Black", 10);
//文字颜色
SolidBrush s = new SolidBrush(Color.RoyalBlue);
g.DrawString(VNum, f, s, 3, 3);
ms = new MemoryStream();
Img.Save(ms, ImageFormat.Jpeg);
Response.ClearContent();
Response.ContentType = "images/Jpeg";
Response.BinaryWrite(ms.ToArray());
g.Dispose();
Img.Dispose();
Response.End();
}
Img = new Bitmap(gheight, 25);
g = Graphics.FromImage(Img);
//背景颜色
g.Clear(Color.LightSteelBlue);
//文字字体
Font f = new Font("Arial Black", 10);
//文字颜色
SolidBrush s = new SolidBrush(Color.RoyalBlue);
g.DrawString(VNum, f, s, 3, 3);
ms = new MemoryStream();
Img.Save(ms, ImageFormat.Jpeg);
Response.ClearContent();
Response.ContentType = "images/Jpeg";
Response.BinaryWrite(ms.ToArray());
g.Dispose();
Img.Dispose();
Response.End();
}
private string RndNum(int VcodeNum)
{
string Vchar = "0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p" +
",q,r,s,t,u,v,w,x,y,z";
string[] VcArray = Vchar.Split(new Char[] { ',' });
string VNum = "";
int temp = -1;
{
string Vchar = "0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p" +
",q,r,s,t,u,v,w,x,y,z";
string[] VcArray = Vchar.Split(new Char[] { ',' });
string VNum = "";
int temp = -1;
Random rand = new Random();
for (int i = 1; i < rand =" new">
int t = rand.Next(35);
if (temp != -1 &&amp;amp;amp;amp;amp; temp == t)
{
return RndNum(VcodeNum);
}
temp = t;
VNum += VcArray[t];
}
return VNum;
}
if (temp != -1 &&amp;amp;amp;amp;amp; temp == t)
{
return RndNum(VcodeNum);
}
temp = t;
VNum += VcArray[t];
}
return VNum;
}
}
Read more.
訂閱:
文章 (Atom)