Dim curdate As Date = DateAdd(DateInterval.Hour, 7, DateTime.UtcNow).ToString("s")
วันศุกร์ที่ 25 ตุลาคม พ.ศ. 2556
วันอังคารที่ 22 ตุลาคม พ.ศ. 2556
stored procedure วนรอบข้อมูลในตาราง A แล้ว insert ลงตาราง B ได้หลายๆเรคคอร์ด
วันจันทร์ที่ 21 ตุลาคม พ.ศ. 2556
Gridview: ใส่หมายเลขลำดับแถวให้กับ gridview (gridview row index number)
<asp:TemplateField> <ItemTemplate> <%# Container.DataItemIndex + 1 %> </ItemTemplate> </asp:TemplateField>
อ้างอิง:http://forums.asp.net/p/992655/1759054.aspx
วันอาทิตย์ที่ 20 ตุลาคม พ.ศ. 2556
แสดงข้อความ "ยังไม่มีข้อมูล จากการค้นหา"
Private Sub LinqDataSource1_Selected(sender As Object, e As LinqDataSourceStatusEventArgs) Handles LinqDataSource1.Selected
If e.TotalRowCount > 0 Then
Label1.Text = "เลือกรายการเพื่อแสดงรายละเอียด"
Else
Label1.Text = "ยังไม่มีข้อมูล จากการค้นหา"
End If
End Sub
Operator '>=' incompatible with operand types 'Int32?' and 'String'
เมื่อผมเขียนโค้ดแบบนี้
Function findData(Hour As Int32)
Dim sql As New StringBuilder
sql.Append("DiffDate >= @DiffDate")
LinqDataSource1.WhereParameters.Clear()
LinqDataSource1.Where = sql.ToString
LinqDataSource1.WhereParameters.Add("DiffDate", Hour)
LinqDataSource1.DataBind()
End Function
กรรมเก่าก็บันดาลให้พบกับ ข้อผิดพลาดแบบนี้
Operator '>=' incompatible with operand types 'Int32?' and 'String'
ดูสิว่าจะจัดการกับมันได้หรือเปล่า ?
.
.
.
ในที่สุดโค้ดแบบผู้บ่าวไทบ้านก็ได้ผล
แบบที่ 1 ระบุ DbType.UInt32
.
.
.
ในที่สุดโค้ดแบบผู้บ่าวไทบ้านก็ได้ผล
แบบที่ 1 ระบุ DbType.UInt32
Function findData(Hour As Int32)
Dim sql As New StringBuilder
sql.Append("DiffDate >= @DiffDate")
LinqDataSource1.WhereParameters.Clear()
LinqDataSource1.Where = sql.ToString
LinqDataSource1.WhereParameters.Add("DiffDate", DbType.UInt32, CStr(Hour))
LinqDataSource1.DataBind()
End Function
javascript: กล่องข้อความยืนยันการลบข้อมูล (Confirm message in javascript in asp.net)
แบบที่ 1 ASP.NET
btnDel.Attributes.Add("Onclick", "return confirm('คุณแน่ใจหรือไม่ที่จะยกเลิกรายการ #Order:" & idProject & " ?');")
วันเสาร์ที่ 19 ตุลาคม พ.ศ. 2556
javascript: previous page asp.net (ปุ่มย้อนกลับ)
สมัครสมาชิก:
บทความ (Atom)
การใช้ WebClient สำหรับเรียก URL
Dim _url As String = " https :// www . MyDomain . com /?q=ทดสอบ " Dim wc As New System . Net . WebClient () wc . Encodin...
-
Public Enum chkdoSave insert = 0 update = 1 End Enum Protected Function doSaveData( ByVal projectName As ...
-
#Region "-- แสดงตัวเลขเป็นตัวหนังสือ --" Public Function NumberToThaiWord( ByVal InputNumber As Double ) As Strin...
-
' สร้างคลาส BundleConfig . cls ' ---------------------------------------------------------------- Imports System . Web . Opti...