Click here to Skip to main content
15,914,111 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Session Pin
Not Active2-Aug-09 5:22
mentorNot Active2-Aug-09 5:22 
AnswerRe: Session Pin
Abhijit Jana2-Aug-09 6:09
professionalAbhijit Jana2-Aug-09 6:09 
AnswerRe: Session Pin
Vimalsoft(Pty) Ltd2-Aug-09 21:35
professionalVimalsoft(Pty) Ltd2-Aug-09 21:35 
QuestionViewState Pin
Ersan Ercek2-Aug-09 3:57
Ersan Ercek2-Aug-09 3:57 
AnswerRe: ViewState Pin
Abhijit Jana2-Aug-09 4:23
professionalAbhijit Jana2-Aug-09 4:23 
QuestionHelp with multiview control and AJAX Pin
Spoks_ST2-Aug-09 2:20
Spoks_ST2-Aug-09 2:20 
AnswerRe: Help with multiview control and AJAX Pin
Spoks_ST2-Aug-09 6:11
Spoks_ST2-Aug-09 6:11 
QuestionCompiler Error Message: BC30367 Pin
Bannoota2-Aug-09 2:07
Bannoota2-Aug-09 2:07 
Dear All.

when i used the code below :

Dim con As New SqlConnection(connection string)
Dim cmd1 As New SqlCommand
Dim ds As New DataSet
Dim da As New SqlDataAdapter
Dim dt As New DataTable

con.Open()

cmd1.Connection = con
cmd1.CommandText = "SELECT Statment"

da.SelectCommand = cmd1
da.Fill(ds, "[Table Name]")
dt = ds.Tables("[Table Name]")
Label1.Text = dt(0)("Column Name")

con.close()


i got the error msg below :

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30367: Class 'System.Data.DataTable' cannot be indexed because it has no default property.


the error is here :Label1.Text = dt(0)("Column Name")


when i searched for the problem i found on MSDN site : the solution is to set the default property !! and i didn't understand what is that mean ?!

thank you advanced

best regards,,

AnswerRe: Compiler Error Message: BC30367 Pin
Manas Bhardwaj2-Aug-09 2:19
professionalManas Bhardwaj2-Aug-09 2:19 
AnswerRe: Compiler Error Message: BC30367 Pin
Bannoota2-Aug-09 3:01
Bannoota2-Aug-09 3:01 
QuestionAdding an extra column to GridView which is bounded to a sql data source Pin
ilker_ege2-Aug-09 1:32
ilker_ege2-Aug-09 1:32 
AnswerRe: Adding an extra column to GridView which is bounded to a sql data source Pin
Manas Bhardwaj2-Aug-09 2:23
professionalManas Bhardwaj2-Aug-09 2:23 
GeneralRe: Adding an extra column to GridView which is bounded to a sql data source Pin
ilker_ege3-Aug-09 5:21
ilker_ege3-Aug-09 5:21 
Questionupdate panel problem in layout when using with girdview Pin
billcodes2-Aug-09 0:31
billcodes2-Aug-09 0:31 
QuestionCall method in parent aspx page from user control Pin
Chazzysb2-Aug-09 0:29
Chazzysb2-Aug-09 0:29 
QuestionSearch Form Question (Newbie) Pin
kruegersck1-Aug-09 5:36
kruegersck1-Aug-09 5:36 
AnswerRe: Search Form Question (Newbie) Pin
Abhijit Jana1-Aug-09 5:49
professionalAbhijit Jana1-Aug-09 5:49 
AnswerRe: Search Form Question (Newbie) Pin
Christian Graus1-Aug-09 12:32
protectorChristian Graus1-Aug-09 12:32 
QuestionListView Pin
mmuutthhuu1-Aug-09 1:30
mmuutthhuu1-Aug-09 1:30 
AnswerRe: ListView Pin
Blue_Boy1-Aug-09 1:53
Blue_Boy1-Aug-09 1:53 
AnswerRe: ListView Pin
Arindam Sinha1-Aug-09 2:28
Arindam Sinha1-Aug-09 2:28 
GeneralRe: ListView Pin
Abhijit Jana1-Aug-09 2:43
professionalAbhijit Jana1-Aug-09 2:43 
GeneralRe: ListView [modified] Pin
Arindam Sinha1-Aug-09 4:07
Arindam Sinha1-Aug-09 4:07 
GeneralRe: ListView Pin
Abhijit Jana1-Aug-09 4:14
professionalAbhijit Jana1-Aug-09 4:14 
GeneralRe: ListView Pin
Blue_Boy1-Aug-09 4:40
Blue_Boy1-Aug-09 4:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.