Hi all,
I'm using RFID Reader to read the data from RFID Card.
The code using as below
vb Code:
Dim WithEvents serialPort As New IO.Ports.SerialPort Public Event onComm(ByVal sender As Object, ByVal e As System.EventArgs) Private psInput As String Private Sub DataReceived( _ ByVal sender As Object, _ ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) _ Handles serialPort.DataReceived Dim strv As String strv = serialPort.ReadExisting If strv <> "" Then psInput = strv Session("InputRFID") = psInput End If End Sub Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Me.IsPostBack = False Then With serialPort .PortName = "COM" & "4" .BaudRate = 9600 .Parity = IO.Ports.Parity.None .DataBits = 8 .StopBits = IO.Ports.StopBits.One .ReceivedBytesThreshold = 11 Try If .IsOpen = False Then .Open() Catch ex As Exception End Try End With End If End Sub
Now My Problem is when the card was scanned, It will firing DataReceived event. I successfully get the data and try to display data on a textbox.
The page do not postback after DataReceived event so the textbox cannot display.
How do I accomplish it ?
Thanks in advance




Reply With Quote