1
Answer

IMAGE VIEW

I want to view image...pls tell me ..




Protected Sub ddlnicno_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlnicno.SelectedIndexChanged
        Dim strQuery As String = "select * from PersonalInformation where" & " NIC_No = @NIC_No"

        Dim cmd As New SqlCommand()
        cmd.Parameters.AddWithValue("@NIC_No", ddlnicno.SelectedItem.Value)
        cmd.CommandType = CommandType.Text
        cmd.CommandText = strQuery
        cmd.Connection = Connect1.consql1


        Try

            Connect1.Openconnection()
            Dim sdr As SqlDataReader = cmd.ExecuteReader()




            While sdr.Read()
                txtempno.Text = sdr("Emp_No").ToString()
                txtfingerprintno.Text = sdr("Finger_Print_No").ToString()
                txtmrmrs.Text = sdr("Mr_Mrs").ToString()
                txtinitial.Text = sdr("Initial").ToString()
                txtsurname.Text = sdr("Surname").ToString()
                txtName.Text = sdr("Name").ToString()
                txtdesignation.Text = sdr("Designation").ToString()
                txtofficetelno.Text = sdr("Office_tel_no").ToString()
                txtresidencetelno.Text = sdr("Residence_No").ToString()
                txtmobileno.Text = sdr("Mobile_No").ToString()
                txtgender.Text = sdr("Gender").ToString()
                txtresidenceaddress.Text = sdr("Residence_Address").ToString()
                txtdistrict.Text = sdr("District").ToString()
                txtdob.Text = sdr("Date_Of_Birth").ToString()
                txtmaritalstatus.Text = sdr("Marital_Status").ToString()
                txtpassportno.Text = sdr("Passport_No").ToString()
                txtemail.Text = sdr("E_mail").ToString()
                txtPath.Text = sdr("Path").ToString()
                txtRegistered.Text = sdr("Register").ToString
                imghr.ImageUrl = imageurl

            End While

        Catch ex As Exception
            Throw ex
        Finally

Answers (1)