Click here to Skip to main content
15,905,427 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Users Uploading Files Pin
coachmackey8-Dec-06 13:33
coachmackey8-Dec-06 13:33 
AnswerRe: Users Uploading Files Pin
Guffa8-Dec-06 16:42
Guffa8-Dec-06 16:42 
GeneralRe: Users Uploading Files Pin
coachmackey8-Dec-06 18:23
coachmackey8-Dec-06 18:23 
GeneralRe: Users Uploading Files Pin
Tal Even-Tov9-Dec-06 1:20
Tal Even-Tov9-Dec-06 1:20 
QuestionAdd Forum to Website Pin
coachmackey8-Dec-06 10:58
coachmackey8-Dec-06 10:58 
AnswerRe: Add Forum to Website Pin
Tal Even-Tov8-Dec-06 23:59
Tal Even-Tov8-Dec-06 23:59 
AnswerRe: Add Forum to Website Pin
ednrgc11-Dec-06 2:09
ednrgc11-Dec-06 2:09 
QuestionHow to GET GridView DataSource value? Pin
vicky4578-Dec-06 8:11
vicky4578-Dec-06 8:11 
Hi,
I am trying to access its datasouce property after the gridview has been databind, but the value is always null.

here is the example I did:

in button1_click:
...
GridView1.DataSource = dataTable1;
GridView1.DataBind();
....

in button2_click:
....
DataTable dt = GridView1.DataSource;
....
The value of dt in button2_Click is always null. I read about that the data source needs to be bound to the GridView control only when the page is first loaded. Thereafter, the values are stored in view state.
How to access ViewState to get the data source property?

Is there anybody know about it?
Thanks in advance!
AnswerRe: How to GET GridView DataSource value? Pin
ednrgc8-Dec-06 8:39
ednrgc8-Dec-06 8:39 
AnswerRe: How to GET GridView DataSource value? Pin
Pradipta Basu8-Dec-06 9:11
Pradipta Basu8-Dec-06 9:11 
AnswerRe: How to GET GridView DataSource value? Pin
Matt Ridley8-Dec-06 9:52
Matt Ridley8-Dec-06 9:52 
GeneralRe: How to GET GridView DataSource value? Pin
vicky4578-Dec-06 10:20
vicky4578-Dec-06 10:20 
AnswerHowever ... Pin
vicky4578-Dec-06 10:24
vicky4578-Dec-06 10:24 
GeneralRe: However ... Pin
indianet8-Dec-06 11:09
indianet8-Dec-06 11:09 
GeneralBasically what I want to do is Pin
vicky4578-Dec-06 12:54
vicky4578-Dec-06 12:54 
GeneralRe: However ... Pin
ednrgc11-Dec-06 1:39
ednrgc11-Dec-06 1:39 
Questionms sql 2005 connection string and db file upload Pin
ullk8-Dec-06 8:11
ullk8-Dec-06 8:11 
AnswerRe: ms sql 2005 connection string and db file upload Pin
indianet8-Dec-06 11:14
indianet8-Dec-06 11:14 
QuestionPositional Flat File Question Pin
Jonathan Snyder8-Dec-06 5:18
Jonathan Snyder8-Dec-06 5:18 
AnswerRe: Positional Flat File Question Pin
ednrgc8-Dec-06 6:07
ednrgc8-Dec-06 6:07 
GeneralRe: Positional Flat File Question Pin
Jonathan Snyder8-Dec-06 7:23
Jonathan Snyder8-Dec-06 7:23 
GeneralRe: Positional Flat File Question Pin
ednrgc8-Dec-06 7:25
ednrgc8-Dec-06 7:25 
GeneralRe: Positional Flat File Question Pin
Jonathan Snyder8-Dec-06 8:32
Jonathan Snyder8-Dec-06 8:32 
GeneralRe: Positional Flat File Question Pin
ednrgc8-Dec-06 8:35
ednrgc8-Dec-06 8:35 
GeneralRe: Positional Flat File Question Pin
Jonathan Snyder8-Dec-06 8:40
Jonathan Snyder8-Dec-06 8: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.