 |
|
อยากทราบว่าดึงข้อมูลในฐานข้อมูลมาโชว์TextBoxจะได้ไหมครับ |
|
 |
|
|
 |
 |
|
ลองเปลี่ยนแบบนี้ก็ยังไม่โชว์ ดันครับ
Code (VB.NET)
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim _q = Request.QueryString("q")
If (_q IsNot Nothing) Then
If _q.Trim() <> "" Then
Dim db As New dbIndirectDataContext()
Dim ts = From t In db.Products
Where t.Product_ID.Contains(_q)
Order By t.Product_ID Descending
Select New With {
.Product_ID = t.Product_ID,
.Product_Name = t.Product_Name,
.Product_Detail = t.Product_Detail,
.Product_Unit = t.Product_Unit,
.Product_Price = t.Product_Price,
.Product_Quantity = t.Product_Quantity
}
If ts.Count() > 0 Then
Dim a As New
TextName.Text = a.GetType()
TextDetail.Text = a.GetType()
TextUnit.Text = a.GetType()
TextPrice.Text = ts.GetType()
TextQuantity.Text = ts.GetType()
End If
Else
Response.RedirectPermanent("StockIN.aspx")
End If
End If
|
 |
 |
 |
 |
Date :
2016-09-29 14:50:27 |
By :
phumiphach |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|