ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  ASP.NET
 
 


 

 
 Visual Basic interview questions  Visual Basic Interview Questions
 C Sharp interview questions  C Sharp Interview Questions
 ASP.NET interview questions  ASP.NET Interview Questions
 VB.NET interview questions  VB.NET Interview Questions
 COM+ interview questions  COM+ Interview Questions
 ADO.NET interview questions  ADO.NET Interview Questions
 IIS interview questions  IIS Interview Questions
 MTS interview questions  MTS Interview Questions
 Crystal Reports interview questions  Crystal Reports Interview Questions
 BizTalk interview questions  BizTalk Interview Questions
 Dot Net interview questions  Dot Net Interview Questions
 Exchange Server interview questions  Exchange Server Interview Questions
 SharePoint interview questions  SharePoint Interview Questions
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions
Question
How do you bind array to gridview? Will it works?
 Question Submitted By :: Swapna
I also faced this Question!!     Rank Answer Posted By  
 
  Re: How do you bind array to gridview? Will it works?
Answer
# 1
get the values in to the array 

now pull that array values in one Dataset haveing same 
array structure

now assign that dataset to the grid view

thats it
 
Is This Answer Correct ?    2 Yes 4 No
Alpesh
 
  Re: How do you bind array to gridview? Will it works?
Answer
# 2
int[] arr = { 1, 2, 3, 4, 5, 6, 7, 8  };
        GridView1.DataSource = arr;
        GridView1.DataBind();

try this.
 
Is This Answer Correct ?    10 Yes 1 No
Senthilselvan
 
 
 
  Re: How do you bind array to gridview? Will it works?
Answer
# 3
Dim i As Integer
        Dim fib(10) As Integer

        fib(0) = 1
        fib(1) = 1

        For i = 2 To 10
            fib(i) = fib(i - 1) + fib(i - 2)
        Next

        Me.grdResults.DataSource = fib
        Me.grdResults.DataBind()
 
Is This Answer Correct ?    1 Yes 1 No
Mallu
 
  Re: How do you bind array to gridview? Will it works?
Answer
# 4
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 ?    1 Yes 0 No
Uma
 

 
 
 
Other ASP.NET Interview Questions
 
  Question Asked @ Answers
 
How can i include both C# and vb.net classes in same solution?  2
In your web.config file which attribute of <Globalization> element identifies the default culture that will be used for web request?  1
can u create two Primary key for a table? --Sivaa BirlaSoft8
Features in ASP.NET? Microsoft2
What is early binding and Late binding. Difference which is better ? DELL2
Suppose you want a certain ASP.NET function executed on MouseOver overa certain button. Where do you add an event handler? Visual-Soft3
How can we read a columnised text data in ASP.Net C#? Columnised means my data is stored in a text file and I have numeric data or string data in this file. For ex. If I am searching for the data of gender and I know that gender data is stored at column 32 in text file. How can I get this data in ASP.Net page. Thanks for help in advance.  2
When we do partial refresh of a page using update panel how server knows it(which event occurs?)  2
what do machine key element in configuration file specify? TCS1
Whats an assembly IBM1
What r Callbacks in ASP.NET?  1
what is service contract,operation contract?  1
Usage of web.config? Microsoft1
How many Controls present in Asp dot net? TCS5
About session modes Wipro2
In SP has contains 10 query,By Using Dataset Object I need to fetch 8th query of records? How?  4
what is assembly? Microsoft2
what is managed and unmanaged code? Microsoft3
How do you relate an aspx page with its code behind page ? Accenture3
What is the T-SQL equivalent of IIF (immediate if/ternary operator) function of other programming languages? Syntax-Softtech1
 
For more ASP.NET Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com