ASPxHtmlEditor ตั้งค่า Uplaod Image Folder

ASPxHtmlEditor สามารถตั้งค่า uplaod image folder ได้ที่ SettingsImageUpload->FileSystemSetting->UploadFolder แล้วใส่ค่าลงไปดังภาพ   เมื่อตั้งค่า เวลาใช้งานแล้วเลือก icon image แล้วกด upload

Read More

Upload File ด้วย ASPxUploadControl จาก DevExpress

วิธี Upload File ด้วย ASPxUploadControl จาก DevExpress ให้ลาก ASPxUploadControl  มาวางไว้ตามโค้ดด้านล่าง และตรงปุ่มกดต้องเพิ่มการเช็คไฟล์ว่ามีการเลือกไฟล์เพื่ออัพโหลดหรือไม่ โดยใช้ ClientSideEvents Click  ดังภาพ   <dx:ASPxUploadControl ID=”ASPxUploadControl1″ ClientInstanceName=”uploadControl” runat=”server”

Read More

Insert ข้อมูลและส่งค่า Primary key กลับมา

Insert ข้อมูลและส่งค่า Primarykey ที่พึ่ง Insert ล่าสุดกลับมาเพื่อนำไปใช้ต่อ โดยใช้ SELECT CAST(scope_identity() AS int ช่วย ตัวอย่างโค้ด #region Add Scholarship Database db = DatabaseFactory.CreateDatabase(); string

Read More

การแทรก script <%...%> นอก Form ของ ASP.NET เองเจอ Error

Error ที่เกิดขึ้น ปัญหาเกิดจากการใช้ Script <%…%> ในหน้า ASPX แต่ไม่อยู่ภายใต้ <form>…</form> หรือภายใต้ Element runat=”server” ดังนั้นวิธีการแก้ไขคือใช้ ครอบ Script <%…%> ไว้ ดังภาพด้านล่าง    

Read More

การเรียกใช้ Control object ของ Masterpage ใน Class

การเรียกใช้ Control object ของ MasterPage ใน Class เช่นตัวอย่างการทำ Popup Status ในหน้า Master Page และทำการเรียกใช้งานผ่าน Class โดยจะต้องอ้างอิงถึง Control ในหน้า MasterPage ด้วย

Read More