login form Check employee id and name availability in database

Dec 14 2022 9:30 AM

How to implement  login form using asp.net to Check employee id and name  exists in database using asp.net .

 

code :

Imports System.Data.SqlClient
Imports System.Data
Imports System.Configuration
Imports System.IO
 

Public Class Surveyform
    Inherits System.Web.UI.Page
    Dim SqlConnection As String = ConfigurationManager.ConnectionStrings("cdtSqlConnection").ConnectionString

Private Sub BtnStart_Click(sender As Object, e As EventArgs) Handles BtnStart.Click
        checkflagchecker()
        If checkflag <> "1" Then
            Session("SurveyId") = EmpID.Text
            Session("SurveyName") = EmpName.Text
            Response.Redirect("Surveyform.aspx?ques=1")
        Else
            PanelError.Visible = True
        End If
    End Sub

    Public Sub checkflagchecker()
        If EmpID.Text = "" Then
            checkflag = "1"
        ElseIf EmpName.Text = "" Then
            checkflag = "1"
        End If
    End Sub

    Public Sub loadques()
        If Request.QueryString("ques") = "" Then
            PanelForm.Visible = True
            Panelsurvey.Visible = False
        Else
            Panelsurvey.Visible = True
            PanelForm.Visible = False


Answers (1)