How do you bind array to gridview? Will it works?
Answer Posted / uma
all the answers are correct, but its not write way to store
array to grid,if u insert data into grid view as the above
mension answers expect first one answer, the data will be
diaplayed in column wise, actually the data in grid view is
displayed in rowwise, so we convert array data into a
spesfic datasource like lists,generic list etc;
int32[] arr=new int32[10];
arr[1]=2;
arr[2]=3;
list<> lt=new list<arr>
lt.add(arr[1]);
lt.add(arr[2]);
GridView1.DataSource = lt;
GridView1.DataBind();
| Is This Answer Correct ? | 9 Yes | 10 No |
Post New Answer View All Answers
What is a postback in asp net?
Define tracing.
Why do we need Sessions?
What is the difference between response.redirect and server.transfer?
What are the security types in ASP/ASP.NET? Different Authentication modes?
What are the new web part controls in asp.net 2.0 ?
How do you do Client-side validation in .Net?
What is difference between web api and web services?
In a webservice, need to display 10 rows from a table. Which is the best choice among datareader or dataset?
How information about the user's locale can be accessed?
How many types of cache are there?
List down the sequence of methods called during the page load.
What is use of Master Page in ASP.NET web pages?
Will session work if cookies is disabled?
What is work flow gen? how can it will work with .Net?