My grid is not display on net

H

hussain abbas

hello
can n e one tell me if i m runing my project on locally so my grid is showing data but when i upload my page on net so it have'nt show my datagrid wut will be the problem ..hers my code is ..
plz reply at this address (e-mail address removed)
Public Class Custome
Inherits System.Web.UI.Pag
Dim myConn As OleDbConnectio
Dim DBRead As OleDbDataReade
Dim DBComm As OleDbComman
Protected WithEvents VAlidataName As System.Web.UI.WebControls.RequiredFieldValidato
Dim strSQL As Strin
#Region " Web Form Designer Generated Code
'This call is required by the Web Form Designer
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent(
End Su

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Ini
'CODEGEN: This method call is required by the Web Form Designe
'Do not modify it using the code editor
InitializeComponent(
End Su
#End Regio
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Loa
'Put user code to initialize the page here..
GetConnection(
FillCompanyCombo(
LockFields(
If Not Page.IsPostBack The
BindData(
End I
End Su

Sub GetConnection(
Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;data source=" & Server.MapPath("\newsasia\Database\NewsAsiaNET.mdb"
myConn = New OleDbConnection(strConn
myConn.Open(
End Su

Sub BindData(
'2. Create the command object, passing in the SQL strin
Const strSQL As String = "SELECT CustomerID,customername, Address, City,zip,Phone, Email FROM customers
DBComm = New OleDbCommand(strSQL, myConn
'Set the datagrid's dastasource to the datareader and databin
DBRead = DBComm.ExecuteReader(

dgPopular.DataSource = DBRea
dgPopular.DataBind(
DBRead.Close(
End Su
 
A

Alvin Bruney [MVP]

most likely. your grid doesn't have data in it so it doesn't show up. put a
check before you bind to the grid to check for data
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,225
Members
46,815
Latest member
treekmostly22

Latest Threads

Top