วันศุกร์ที่ 23 มกราคม พ.ศ. 2552

_doPostBack กับ Hidden Value

Asp.net การทำงานแบบ Ajax เราสามารถเก็บค่าเอาไว้ใน Hidden value แทน Viewstate ได้  แต่เมื่อต้องการจะนำมาใช้  จะดึงค่ามาใช้ได้ตอน Page_PreRender นะคร้าบ

วันจันทร์ที่ 12 มกราคม พ.ศ. 2552

Enum to String and String to Enum

Enum to String
Enum.GetName( typeof(EnumType), mode)

String to Enum
(EnumType)Enum.Parse(typeof(EnumType);, EnumValue, true);

วันศุกร์ที่ 9 มกราคม พ.ศ. 2552

Generate key file (*.snk) by sn.exe

Go to Visual Studio Tool For "Visual Studio 2xxx Command Prompt
and type "sn.exe -k xxxx.snk"
Example

sn.exe -k c:\myKeyFile.snk

this will generate myKeyFile.snk to C:\