C# พิมพ์ /// ที่บรรทัดก่อนบรรทัด function
ส่วน vb ก็ ''' ครับ
เมื่อพิมพ์แล้ว VS.NET จะ Generate Template การใส่มาให้โดยอัตโนมัติ
http://greatfriends.biz/webboards/msg.asp?b=SURREALIST&id=96617
Thursday, January 15, 2009
Thursday, December 11, 2008
app_offline.htm ใน asp.net 2.0
อีกหนึ่ง feature ที่เป็นสิ่งใหม่ใน asp.net 2.0 ก็คือการสร้าง file app_offline.htm ไปวางไว้ใน web root เพื่อทำการบอก user ของเราว่าเวบของเราตอนนี้กำลัง update อยู่framework 2.0จะทำความรู้จักfileนี้เองโดยอัตโนมัติโดยที่เราไม่ต้องทำอะไรเลย ง่ายต่อการนำไปใช้
ข้อที่ควรระวังก็คือ ใน IE6 ต้องไป config browser ตรง
Tools->Internet Options->Advanced tab ->"Show Friendly Http Errors Message"
ถ้าไม่เลือก option นี้เอาไว้เวลา user เข้าใช้จะแสดง error 404 แทน วิธีที่แก้ใขโดยที่ user ไม่ต้องเลือกตรง Option นี้ก็คือการสร้าง app_offline.htm ให้มีขนาด file มากกว่า 512 byte เพื่อให้แน่ใจว่า user ทุกคนเข้าเวบเรามาแล้วแสดงหน้านี้ตลอด หาก file app_offline.htm ของเรามีไม่ถึง 512 byte อาจใช้วิธีการใส่ comment ลงไปเพื่อให้ file มีขนาดเกิน 512 byte ดังตัวอย่างด้านล่าง
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> My Under ConStruction</TITLE>
</HEAD>
<BODY>
<h1>This Site Under Construction N o w !...</h1>
<!--
this coment text
<h1>This Site Under Construction N o w !...</h1>
<h1>This Site Under Construction N o w !...</h1>
<h1>This Site Under Construction N o w !...</h1>
<h1>This Site Under Construction N o w !...</h1>
<h1>This Site Under Construction N o w !...</h1>
<h1>This Site Under Construction N o w !...</h1>
<h1>This Site Under Construction N o w !...</h1>
<h1>This Site Under Construction N o w !...</h1>
<h1>This Site Under Construction N o w !...</h1>
<h1>This Site Under Construction N o w !...</h1>
-->
</BODY>
</HTML>
ที่มา: http://codesnippet.exteen.com/20060628/app-offline-htm-asp-net-2-0
ข้อที่ควรระวังก็คือ ใน IE6 ต้องไป config browser ตรง
Tools->Internet Options->Advanced tab ->"Show Friendly Http Errors Message"
ถ้าไม่เลือก option นี้เอาไว้เวลา user เข้าใช้จะแสดง error 404 แทน วิธีที่แก้ใขโดยที่ user ไม่ต้องเลือกตรง Option นี้ก็คือการสร้าง app_offline.htm ให้มีขนาด file มากกว่า 512 byte เพื่อให้แน่ใจว่า user ทุกคนเข้าเวบเรามาแล้วแสดงหน้านี้ตลอด หาก file app_offline.htm ของเรามีไม่ถึง 512 byte อาจใช้วิธีการใส่ comment ลงไปเพื่อให้ file มีขนาดเกิน 512 byte ดังตัวอย่างด้านล่าง
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> My Under ConStruction</TITLE>
</HEAD>
<BODY>
<h1>This Site Under Construction N o w !...</h1>
<!--
this coment text
<h1>This Site Under Construction N o w !...</h1>
<h1>This Site Under Construction N o w !...</h1>
<h1>This Site Under Construction N o w !...</h1>
<h1>This Site Under Construction N o w !...</h1>
<h1>This Site Under Construction N o w !...</h1>
<h1>This Site Under Construction N o w !...</h1>
<h1>This Site Under Construction N o w !...</h1>
<h1>This Site Under Construction N o w !...</h1>
<h1>This Site Under Construction N o w !...</h1>
<h1>This Site Under Construction N o w !...</h1>
-->
</BODY>
</HTML>
ที่มา: http://codesnippet.exteen.com/20060628/app-offline-htm-asp-net-2-0
Labels:
ASP.NET
Monday, November 24, 2008
How to Add a Shortcut Icon to a Web Page
<head>
<link rel="SHORTCUT ICON" href="http://www.mydomain.com/myicon.ico"/>
<title>My Title</title>
</head>
<link rel="SHORTCUT ICON" href="http://www.mydomain.com/myicon.ico"/>
<title>My Title</title>
</head>
http://msdn.microsoft.com/en-us/library/ms537656.aspx
Labels:
HTML XHTML
Thursday, November 6, 2008
An ASP.NET setting has been detected that does not apply in the Integrated managed pipeline mode

จะเจอ error นี้เมื่อสร้าง application หรือ vertual directory ใหม่แล้วเข้าใช้เว็บไซต์ (IIS7)
แก้โดยกด “Windows” + “R” แล้วพิมพ์ %SystemRoot%\system32\inetsrv\appcmd migrate config "Default Web Site/" กด OK เป็นอันเสร็จ
ลอง refresh หน้าจอใหม่ก็จะ run application ได้
http://blog.benhall.me.uk/2008/05/aspnet-setting-has-been-detected-that.html
http://www.monavista.com/webboard/showthread.php?t=4839
Labels:
ASP.NET,
IIS7,
Windows Vista
Thursday, October 2, 2008
Visual Studio 2008 Error
SOFTWARE:
Visual Studio 2008 Team Database Edition
SQL Server 2005 Enterprise SP2
ERRORS:
"The database that you selected is not supported"
Unable to add data connection.
Could not load file or assembly
'Microsoft.SQLServer.Management.Sdk.Sfc, Version=10.0.0.0,
Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its
dependencies. The sytem cannot find the file specified.
STEPS TO REPRODUCE:
Data > Schema Compare
New Connection..
Type in all info > select database name (it IS seeing all the
databases on the server)
click Test Connection
"Test Connection suceeded"
Click OK
"The database that you selected is not supported"
Does the same thing if I do
New Project > Visual C# > Database > SQL Server Project
Server Explorer
Add New Connection
Error:
Unable to add data connection.
Could not load file or assembly
'Microsoft.SQLServer.Management.Sdk.Sfc, Version=10.0.0.0,
Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its
dependencies. The sytem cannot find the file specified.
TROUBLESHOOTING STEPS ALREADY TAKEN:
I tried totally uninstalling Visual Studio 2008, 2005, and SQL 2005
Workstation Components/Client Tools..
Installed Visual Studio 2008
Tried same thing, got same error message.
Installed SQL 2005 Workstation Components / Client Tools
Installed SQL 2005 SP2
Tried same thing, got same error message.
SOLUTION: Download and install following from Microsoft.
- Microsoft SQL Server 2008 Native Client
- Microsoft SQL Server System CLR Types
- Microsoft SQL Server 2008 Management Objects
These features can be downloaded from:
http://www.microsoft.com/downloads/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en#filelist
Reference: http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.vstudio.general&tid=89ee0e86-b8fc-40a7-a0e1-51ac4033302e&cat=en_US_38f7e3d1-40bd-4daf-941f-f45d2ff6ff9b&lang=en&cr=US&sloc=&p=1
Visual Studio 2008 Team Database Edition
SQL Server 2005 Enterprise SP2
ERRORS:
"The database that you selected is not supported"
Unable to add data connection.
Could not load file or assembly
'Microsoft.SQLServer.Management.Sdk.Sfc, Version=10.0.0.0,
Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its
dependencies. The sytem cannot find the file specified.
STEPS TO REPRODUCE:
Data > Schema Compare
New Connection..
Type in all info > select database name (it IS seeing all the
databases on the server)
click Test Connection
"Test Connection suceeded"
Click OK
"The database that you selected is not supported"
Does the same thing if I do
New Project > Visual C# > Database > SQL Server Project
Server Explorer
Add New Connection
Error:
Unable to add data connection.
Could not load file or assembly
'Microsoft.SQLServer.Management.Sdk.Sfc, Version=10.0.0.0,
Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its
dependencies. The sytem cannot find the file specified.
TROUBLESHOOTING STEPS ALREADY TAKEN:
I tried totally uninstalling Visual Studio 2008, 2005, and SQL 2005
Workstation Components/Client Tools..
Installed Visual Studio 2008
Tried same thing, got same error message.
Installed SQL 2005 Workstation Components / Client Tools
Installed SQL 2005 SP2
Tried same thing, got same error message.
SOLUTION: Download and install following from Microsoft.
- Microsoft SQL Server 2008 Native Client
- Microsoft SQL Server System CLR Types
- Microsoft SQL Server 2008 Management Objects
These features can be downloaded from:
http://www.microsoft.com/downloads/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en#filelist
Reference: http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.vstudio.general&tid=89ee0e86-b8fc-40a7-a0e1-51ac4033302e&cat=en_US_38f7e3d1-40bd-4daf-941f-f45d2ff6ff9b&lang=en&cr=US&sloc=&p=1
Labels:
Visual Studio 2008
Subscribe to:
Posts (Atom)
