请帮助我为客户传递参数 http://192.168.1.239/Webandroid/Dtdgrid.aspx?customer=1006
页面在加载时删除传递的参数。 如何在使用B4a android时完成此操作? 以下是我的ASP.NET网页代码。 当我从浏览器传递参数时,它成功完成了这项工作。从B4a代码怎么样?
Imports System.Data.SqlClient
Imports System.Configuration
Partial Class Dtdgrid
Inherits System.Web.UI.Page
Private Sub form1_Load(sender As Object, e As EventArgs) Handles form1.Load
Customer.Text = Request.QueryString("customer")
Delete(Customer.Text.ToString)
End Sub
Public Sub Delete(customerId As Integer)
Dim constr As String = ConfigurationManager.ConnectionStrings("constr").ConnectionString
Using con As New SqlConnection(constr)
Using cmd As New SqlCommand("DELETE FROM Customers WHERE CustomerId = @CustomerId")
cmd.Parameters.AddWithValue("@CustomerId", customerId)
cmd.Connection = con
con.Open()
cmd.ExecuteNonQuery()
con.Close()
End Using
End Using
End Sub
End Class