อยากถามว่า ถ้าเอาขึ้น Production จริงมีปัญหาอะไรไหม?
--- ในกรณีที่เป็น Host เช่า
--- ในกรณีที่มี Host เป็นของตัวเอง (วาง Server เอง)
Date :
2016-12-04 09:17:12
By :
หน้าฮี
No. 4
Guest
ผลการทดสอบประสิทธิภาพในเบื้องต้น
ก่อน Update
4.55 KB Transfers.878.81 ms Taken.
หลัง Update
4.55 KB Transfers.161.72 ms Taken.
ประสิทธิภาพเพิ่มขึ้นมากโขพอดู
Date :
2016-12-04 09:47:08
By :
หน้าฮี
No. 5
Guest
Optimize Code (VB.NET)
Imports System.Collections.Generic
Imports System.Linq
Imports System.Web
Imports System.Web.Optimization
Imports System.Web.UI
Public Module BundleConfig
' For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkID=303951
Public Sub RegisterBundles(bundles As BundleCollection)
BundleTable.EnableOptimizations = True
bundles.Add(New ScriptBundle("~/bundles/WebFormsJs").Include(
"~/Scripts/WebForms/WebForms.js",
"~/Scripts/WebForms/WebUIValidation.js",
"~/Scripts/WebForms/MenuStandards.js",
"~/Scripts/WebForms/Focus.js", "~/Scripts/WebForms/GridView.js",
"~/Scripts/WebForms/DetailsView.js",
"~/Scripts/WebForms/TreeView.js",
"~/Scripts/WebForms/WebParts.js"))
' Order is very important for these files to work, they have explicit dependencies
bundles.Add(New ScriptBundle("~/bundles/MsAjaxJs").Include(
"~/Scripts/WebForms/MsAjax/MicrosoftAjax.js",
"~/Scripts/WebForms/MsAjax/MicrosoftAjaxApplicationServices.js",
"~/Scripts/WebForms/MsAjax/MicrosoftAjaxTimer.js",
"~/Scripts/WebForms/MsAjax/MicrosoftAjaxWebForms.js"))
' Use the Development version of Modernizr to develop with and learn from. Then, when you’re
' ready for production, use the build tool at http://modernizr.com to pick only the tests you need
bundles.Add(New ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"))
ScriptManager.ScriptResourceMapping.AddDefinition("respond", New ScriptResourceDefinition() With {
.Path = "~/Scripts/respond.min.js",
.DebugPath = "~/Scripts/respond.js"})
'BundleTable.EnableOptimizations = True
End Sub
End Module
'Web.Config
'<compilation debug="false" targetFramework="4.5.2" />
Public Class Customers
'Ctor
Sub New()
End Sub
Property CustID As Integer
Property CustCode As String
Property CustName As String
End Class
Private Sub Form_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim lstCustomers = New List(Of Customers)
lstCustomers.Add(New Customers With {.CustID = 1, .CustCode = "A0001", .CustName = "Amata company Ltd."})
lstCustomers.Add(New Customers With {.CustID = 2, .CustCode = "A0002", .CustName = "Aroma company Ltd."})
Dim lstIList As IList = lstCustomers
Dim lstObj0 = lstIList.Cast(Of Object).ToList().Find(Function(x) x.CustID = 2)
Dim lstObj1 = lstIList.Cast(Of Customers).ToList().Find(Function(x) x.CustID = 1)
'Debug Value
If 1=2 Then 'click this line and press F9
End If
End Sub