Imports System.Data.Oledb Imports System.IO Imports System.Web.Mail Public Class doc_req Inherits System.Web.UI.Page #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. Private Sub InitializeComponent() End Sub Protected WithEvents lnkhome As System.Web.UI.WebControls.LinkButton Protected WithEvents lnklogout As System.Web.UI.WebControls.LinkButton Protected WithEvents IFRAME1 As System.Web.UI.HtmlControls.HtmlGenericControl Protected WithEvents TD3 As System.Web.UI.HtmlControls.HtmlTableCell Protected WithEvents TD1 As System.Web.UI.HtmlControls.HtmlTableCell 'NOTE: The following placeholder declaration is required by the Web Form Designer. 'Do not delete or move it. Private designerPlaceholderDeclaration As System.Object Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub #End Region Dim con As New ConClass Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cmd As New OleDbCommand, Rs As OleDbDataReader, Rpid, Rdid, Rid, tp Dim ifrm As HtmlControl = FindControl("IFRAME1") If Not IsPostBack() Then Rdid = 0 Rpid = 0 Rid = 0 Session("pcode") = Request.QueryString("pcode") cmd.CommandText = "Select * from Doctor where DoctorCode='" & Trim(Session("pcode")) & "'" cmd.Connection = con.Create(Server.MapPath("db")) Rs = cmd.ExecuteReader() If Rs.Read Then TD3.InnerHtml = " Doctor Code:" & Rs.GetValue(0) & "   Doctor Name: " & Rs.GetValue(1) & "
 Username: " & Rs.GetValue(2) End If Rs.Close() cmd.Dispose() con.Close() ifrm.Attributes.Add("src", "fra_doc_req.aspx?cd=" & Trim(Session("pcode"))) End If End Sub Private Sub lnkhome_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lnkhome.Click Server.Transfer("home.aspx") End Sub Private Sub lnklogout_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lnklogout.Click Session.Abandon() Server.Transfer("default.aspx") End Sub End Class