Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSCOMM problem

Status
Not open for further replies.
Mar 31, 2003
22
EU
Hi,

I can read my COMport but I can't seem to display the data in a text box in my WebForm.

'DECLARING
Imports MSCommLib
" "
" "
Protected WithEvents mscomm As New MSCommClass()


'OPEN PORT - WORKS
Private Sub btnOpen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOpen.Click
With mscomm
.CommPort = 1
.Settings = ("9600,N,8,1")
.RThreshold = 1
.PortOpen = True
.RTSEnable = True
.InputMode = InputModeConstants.comInputModeText
.InputLen = 100
End With
lbMsg.Text = "Port open."
End Sub

'READ PORT
Public Sub mscomm_OnComm() Handles mscomm.OnComm
Dim instr As String 'works fine
instr = mscomm.Input 'instr gets populated
txtReceive.Text = instr 'txtReceive.Text gets populated
End Sub

My problem is that I can't see the value in txtReceive.Text on my WebForm !!

Any help is apprecited.
JL
 
At a guess you wont see the text because a Postback is needed before the contents of the textbox are redrawn. But you really are better asking in the ASP.Net forum.


Sweep
...if it works dont f*** with it
...if its f****ed blame someone else
...if its your fault that its f***ed, say and admit nothing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top