Click here to Skip to main content
15,889,595 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionProgrammatically creating button Pin
humayunlalzad24-Nov-09 20:09
humayunlalzad24-Nov-09 20:09 
AnswerRe: Programmatically creating button Pin
Abhijit Jana24-Nov-09 20:16
professionalAbhijit Jana24-Nov-09 20:16 
GeneralRe: Programmatically creating button Pin
humayunlalzad24-Nov-09 21:04
humayunlalzad24-Nov-09 21:04 
QuestionGridview total number of rows Pin
srinandan..24-Nov-09 19:26
srinandan..24-Nov-09 19:26 
AnswerRe: Gridview total number of rows Pin
Abhijit Jana24-Nov-09 19:30
professionalAbhijit Jana24-Nov-09 19:30 
GeneralRe: Gridview total number of rows Pin
srinandan..24-Nov-09 19:49
srinandan..24-Nov-09 19:49 
GeneralRe: Gridview total number of rows Pin
Abhijit Jana24-Nov-09 20:20
professionalAbhijit Jana24-Nov-09 20:20 
GeneralRe: Gridview total number of rows Pin
srinandan..24-Nov-09 21:59
srinandan..24-Nov-09 21:59 
I am doing the following thing

protected void Button1_Click(object sender, EventArgs e)
{
int recordCount;
DataSet ds=(DataSet)GridView1.DataSource;
recordCount = ds.Tables[0].Rows.Count;
Response.Write(recordCount);
}

get error "Object reference not set to an instance of an object." stating ds.Tables[0] is null.
I am not getting why this is happing even i am binding the gridview in page load under if(!IsPostBack).

Thanks,
Sri...
GeneralRe: Gridview total number of rows Pin
Nishant Singh24-Nov-09 20:40
Nishant Singh24-Nov-09 20:40 
GeneralRe: Gridview total number of rows Pin
srinandan..24-Nov-09 22:07
srinandan..24-Nov-09 22:07 
GeneralRe: Gridview total number of rows Pin
Satish Mahapatra24-Nov-09 22:22
Satish Mahapatra24-Nov-09 22:22 
GeneralRe: Gridview total number of rows Pin
srinandan..24-Nov-09 23:17
srinandan..24-Nov-09 23:17 
GeneralRe: Gridview total number of rows Pin
Nishant Singh25-Nov-09 0:50
Nishant Singh25-Nov-09 0:50 
QuestionRemove masterpage Pin
Subin Mavunkal24-Nov-09 18:47
Subin Mavunkal24-Nov-09 18:47 
AnswerRe: Remove masterpage Pin
Abhijit Jana24-Nov-09 18:52
professionalAbhijit Jana24-Nov-09 18:52 
QuestionProblem related to textbox Pin
Arun k. yadav24-Nov-09 18:29
Arun k. yadav24-Nov-09 18:29 
AnswerRe: Problem related to textbox Pin
Abhijit Jana24-Nov-09 18:53
professionalAbhijit Jana24-Nov-09 18:53 
GeneralRe: Problem related to textbox Pin
Anurag Gandhi24-Nov-09 20:39
professionalAnurag Gandhi24-Nov-09 20:39 
GeneralRe: Problem related to textbox Pin
April Fans24-Nov-09 22:58
April Fans24-Nov-09 22:58 
AnswerRe: Problem related to textbox Pin
Anurag Gandhi24-Nov-09 20:36
professionalAnurag Gandhi24-Nov-09 20:36 
QuestionApplication designing issue Pin
Amit Patel198524-Nov-09 18:16
Amit Patel198524-Nov-09 18:16 
AnswerRe: Application designing issue Pin
Abhijit Jana24-Nov-09 18:56
professionalAbhijit Jana24-Nov-09 18:56 
AnswerRe: Application designing issue Pin
Vimalsoft(Pty) Ltd24-Nov-09 19:27
professionalVimalsoft(Pty) Ltd24-Nov-09 19:27 
AnswerRe: Application designing issue Pin
carlecomm26-Nov-09 14:45
carlecomm26-Nov-09 14:45 
QuestionDetailsView Update Problem Pin
RajpootRohan24-Nov-09 18:11
professionalRajpootRohan24-Nov-09 18:11 

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.