ASPxHtmlEditor สามารถตั้งค่า uplaod image folder ได้ที่ SettingsImageUpload->FileSystemSetting->UploadFolder แล้วใส่ค่าลงไปดังภาพ เมื่อตั้งค่า เวลาใช้งานแล้วเลือก icon image แล้วกด upload
Category: C#
Upload File ด้วย ASPxUploadControl จาก DevExpress
วิธี Upload File ด้วย ASPxUploadControl จาก DevExpress ให้ลาก ASPxUploadControl มาวางไว้ตามโค้ดด้านล่าง และตรงปุ่มกดต้องเพิ่มการเช็คไฟล์ว่ามีการเลือกไฟล์เพื่ออัพโหลดหรือไม่ โดยใช้ ClientSideEvents Click ดังภาพ <dx:ASPxUploadControl ID=”ASPxUploadControl1″ ClientInstanceName=”uploadControl” runat=”server”
Insert ข้อมูลและส่งค่า Primary key กลับมา
Insert ข้อมูลและส่งค่า Primarykey ที่พึ่ง Insert ล่าสุดกลับมาเพื่อนำไปใช้ต่อ โดยใช้ SELECT CAST(scope_identity() AS int ช่วย ตัวอย่างโค้ด #region Add Scholarship Database db = DatabaseFactory.CreateDatabase(); string
การสร้าง Web Form Method Post ของ ASP.NET คล้ายๆกับ Form method POST ของ PHP
การสร้าง Web Form Method Post ของ ASP.NET คล้ายๆกับ Form method POST ของ PHP หน้า Form Post <form method=”post”> <%for (int
C# Alert JavaScript
C# Alert JavaScript วีธีแสดง Alert Javascript ใน Code Behide สามารถทำได้โดยแก้ไขในไฟล์ Code Behide ตามตัวอย่างด้านล่าง using System; using System.Collections.Generic; using System.Linq; using
การแทรก script <%...%> นอก Form ของ ASP.NET เองเจอ Error
Error ที่เกิดขึ้น ปัญหาเกิดจากการใช้ Script <%…%> ในหน้า ASPX แต่ไม่อยู่ภายใต้ <form>…</form> หรือภายใต้ Element runat=”server” ดังนั้นวิธีการแก้ไขคือใช้ ครอบ Script <%…%> ไว้ ดังภาพด้านล่าง
Import Excel File to SQL Server
ตัวอย่าง Code 1 ตัวอย่าง Code 2 Credit นุชิต อรรจนวจรรน์ GreatFriends Community Leader (nano) WindowsITPro Columnist Microsoft MVP
Error: The wait operation timed out เวลา Query ด้วย SQL Command
Error: The wait operation timed out เวลา Query ด้วย SQL Command แก้โดยเพิ่ม Timeout ตอนสั่ง Query เพิ่ม
