Ask a Question related to ASP Database, Design and Development.
-
mhnazly #1
basic data read and put it on web form
i'm trying to read data from SQL Server database using
data reader and assigned it to a label in my asp.net web
application. but when the button is clicked, nothing
appears. please help, thanks.
Private Sub btnTesting_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
btnTesting.Click
Dim cn As New SqlClient.SqlConnection
Dim cm As New SqlClient.SqlCommand
Dim dr As SqlClient.SqlDataReader
cn.ConnectionString = _
"data source=MHNAZLY;initial catalog=MEDICAL;"
Try
cn.Open()
Try
cm.Connection = cn
cm.CommandText = "SELECT StaffID,
StaffName, Designation, Contact_no, Email FROM
Admin_Staff WHERE(StaffID='1001104214')"
dr = cm.ExecuteReader()
Try
While dr.Read()
'lblDoctorID.Text = dr.Item
("StaffID").ToString()
lblDoctorID.Text = dr.GetString(1)
End While
Finally
dr.Close()
End Try
Finally
cn.Close()
End Try
Catch ex As Exception
End Try
End Sub
mhnazly Guest
-
How read fields in pdf with Visual Basic 6
How read fields in Pdf with Visual Basic 6, please? -
Very basic form validation question
Tabla Junkie wrote: If you're on CFMX 7 you can validate it this way within a cfform block: <cfinput type="text" required="yes" validate="email"... -
basic submit form button
Hi, I am trying to create a very simple form with the submit button. I am fairly new creating forms contected to mysql. I would think that once... -
Basic form to email - from field?
I have a very basic short form on a website that works fine, but I'd like for the email "from" field to actually display the email address of the... -
Basic Problems with data
Hi all, Sorry that this is such a basic question - I just can't seem to find the answer or the way of doing it myself! I'm pretty new to Flash... -
Ray at #2
Re: basic data read and put it on web form
Please see here. [url]http://www.aspfaq.com/5002[/url]
Ray at home
"mhnazly" <anonymous@discussions.microsoft.com> wrote in message
news:06c401c39aa8$1b8c2b20$a301280a@phx.gbl...> Private Sub btnTesting_Click(ByVal sender As
> System.Object, ByVal e As System.EventArgs) Handles
> btnTesting.Click
Ray at Guest



Reply With Quote

