S
solutionsdxb
Hi ,
I am using a code behind for asp.net page ,
<%@ Page Language="VB" AutoEventWireup="false"
CodeFile="Default.aspx.vb" Inherits="_Default" %>
and file default.aspx.vb contains all the code including
Sub Page_Load()
If Request.QueryString("check") = "p" Then
'1. Create a connection
Dim tempemail As String
tempemail = User.Identity.Name
Me.rptrExample.EnableViewState = "True"
Me.rptrExample.Visible = "True"
Dim objConn As New
Data.SqlClient.SqlConnection(strConnString)
Dim strSQL As String
strSQL = "SELECT ufname,ulname,udate,uid FROM users where
uemail='" & tempemail & "'"
Dim objCmd As New Data.SqlClient.SqlCommand(strSQL,
objConn)
Try
objCmd.Connection.Open()
rptrExample.DataSource = objCmd.ExecuteReader()
rptrExample.DataBind()
objCmd.Connection.Close()
objCmd.Connection.Dispose()
Catch ex As Exception
lblStatus.Text = ex.Message
End Try
End sub
rptrexample is a repeater control but does not display anything and
not even the label display any message or error , so is it because i
am using code behind the request query string does not work, kindly
suggest.
Regards
I am using a code behind for asp.net page ,
<%@ Page Language="VB" AutoEventWireup="false"
CodeFile="Default.aspx.vb" Inherits="_Default" %>
and file default.aspx.vb contains all the code including
Sub Page_Load()
If Request.QueryString("check") = "p" Then
'1. Create a connection
Dim tempemail As String
tempemail = User.Identity.Name
Me.rptrExample.EnableViewState = "True"
Me.rptrExample.Visible = "True"
Dim objConn As New
Data.SqlClient.SqlConnection(strConnString)
Dim strSQL As String
strSQL = "SELECT ufname,ulname,udate,uid FROM users where
uemail='" & tempemail & "'"
Dim objCmd As New Data.SqlClient.SqlCommand(strSQL,
objConn)
Try
objCmd.Connection.Open()
rptrExample.DataSource = objCmd.ExecuteReader()
rptrExample.DataBind()
objCmd.Connection.Close()
objCmd.Connection.Dispose()
Catch ex As Exception
lblStatus.Text = ex.Message
End Try
End sub
rptrexample is a repeater control but does not display anything and
not even the label display any message or error , so is it because i
am using code behind the request query string does not work, kindly
suggest.
Regards