Click here to Skip to main content
15,888,454 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Push Page Code Pin
sulabh202010-Feb-08 19:25
sulabh202010-Feb-08 19:25 
GeneralRe: Push Page Code Pin
Syed Ali Raza10-Feb-08 19:52
Syed Ali Raza10-Feb-08 19:52 
GeneralOnline Examination Pin
sjs4u10-Feb-08 18:45
sjs4u10-Feb-08 18:45 
GeneralRe: Online Examination Pin
Sun Rays10-Feb-08 18:59
Sun Rays10-Feb-08 18:59 
GeneralRe: Online Examination Pin
sjs4u10-Feb-08 19:12
sjs4u10-Feb-08 19:12 
GeneralRe: Online Examination Pin
N a v a n e e t h10-Feb-08 19:31
N a v a n e e t h10-Feb-08 19:31 
GeneralRe: Online Examination Pin
sjs4u10-Feb-08 19:41
sjs4u10-Feb-08 19:41 
GeneralRe: Online Examination Pin
N a v a n e e t h10-Feb-08 19:57
N a v a n e e t h10-Feb-08 19:57 
sjs4u wrote:
But First time I have no idea about generic List class.


Generics is a new concept included in .NET 2.0 onwards. If you use a generic List class, you can supply the type of object which will be kept in the list, which is more efficient than casting from object to your desired type. In your code you are keeping DataRow instance in the array list. Here is an example which uses List to keep the DataRow instance which is strongly typed.
List<DataRow> list = new List<DataRow> ;
list.Add(ds1.Tables[0].Rows[m]) ;


sjs4u wrote:
Now I want to get back the arraylist records.


Use a foreach
foreach(DataRow row in (DataRow)QuestionArrayList)
{
//Use row["columnname"] to get value.
}

OR

foreach(object obj in QuestionArrayList)
{
   DataRow row = null;
   if(obj is DataRow)
        row = (DataRow)obj;
   //Use row["columnname"] to get value.
}
If you use a generic List you can avoid the casting.

All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia

My Website | Ask smart questions

Generalproblem regarding ToolTip. please send me help . Pin
Prashant B. Lavate10-Feb-08 18:27
Prashant B. Lavate10-Feb-08 18:27 
GeneralRe: problem regarding ToolTip. please send me help . Pin
Sun Rays10-Feb-08 18:56
Sun Rays10-Feb-08 18:56 
GeneralRe: problem regarding ToolTip. please send me help . Pin
N a v a n e e t h10-Feb-08 20:00
N a v a n e e t h10-Feb-08 20:00 
GeneralASP.net with MYSQL Pin
w20910-Feb-08 15:48
w20910-Feb-08 15:48 
GeneralRe: ASP.net with MYSQL Pin
Piyush Vardhan Singh10-Feb-08 18:34
Piyush Vardhan Singh10-Feb-08 18:34 
GeneralRe: ASP.net with MYSQL Pin
w20911-Feb-08 17:59
w20911-Feb-08 17:59 
GeneralRe: ASP.net with MYSQL Pin
Piyush Vardhan Singh10-Feb-08 18:50
Piyush Vardhan Singh10-Feb-08 18:50 
GeneralRe: ASP.net with MYSQL Pin
Michael Sync10-Feb-08 19:10
Michael Sync10-Feb-08 19:10 
GeneralRe: ASP.net with MYSQL Pin
Michael Sync10-Feb-08 19:11
Michael Sync10-Feb-08 19:11 
GeneralRe: ASP.net with MYSQL Pin
N a v a n e e t h10-Feb-08 19:46
N a v a n e e t h10-Feb-08 19:46 
QuestionHow to open custom web page when click Browse Button on "File Upload" control Pin
$unil Dhiman10-Feb-08 14:00
$unil Dhiman10-Feb-08 14:00 
GeneralRe: How to open custom web page when click Browse Button on "File Upload" control Pin
Venkatesh Mookkan10-Feb-08 15:45
Venkatesh Mookkan10-Feb-08 15:45 
GeneralRe: How to open custom web page when click Browse Button on "File Upload" control Pin
$unil Dhiman10-Feb-08 20:09
$unil Dhiman10-Feb-08 20:09 
QuestionResponse.BinaryWrite() from within CompositeControl does not work properly Pin
Member 325882310-Feb-08 13:27
Member 325882310-Feb-08 13:27 
Generalimport addresses from gmail, yahoo, hotmail, aol, etc. Pin
shefali_sinha10-Feb-08 12:52
shefali_sinha10-Feb-08 12:52 
GeneralRe: import addresses from gmail, yahoo, hotmail, aol, etc. Pin
dilipv12-Feb-08 0:02
dilipv12-Feb-08 0:02 
QuestionRe: import addresses from gmail, yahoo, hotmail, aol, etc. Pin
shefali_sinha13-Feb-08 8:13
shefali_sinha13-Feb-08 8:13 

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.