Click here to Skip to main content
15,908,013 members
Home / Discussions / C#
   

C#

 
AnswerRe: enum question Pin
Luc Pattyn12-Jun-07 0:37
sitebuilderLuc Pattyn12-Jun-07 0:37 
GeneralRe: enum question Pin
akkram12-Jun-07 0:43
akkram12-Jun-07 0:43 
GeneralRe: enum question Pin
DavidNohejl12-Jun-07 2:27
DavidNohejl12-Jun-07 2:27 
QuestionHow to record the video from web camera Pin
Exelioindia11-Jun-07 23:53
Exelioindia11-Jun-07 23:53 
AnswerRe: How to record the video from web camera Pin
Thomas Stockwell12-Jun-07 3:10
professionalThomas Stockwell12-Jun-07 3:10 
GeneralRe: How to record the video from web camera Pin
Exelioindia12-Jun-07 3:54
Exelioindia12-Jun-07 3:54 
QuestionHow can simulate button clicking in multiple threads environment? Pin
gzcjun11-Jun-07 23:39
gzcjun11-Jun-07 23:39 
QuestionClarification On Static Member [modified] Pin
Rahul8311-Jun-07 23:22
Rahul8311-Jun-07 23:22 
Hi friends..plz go through this pseudo code

I Included Requirid Namespaces
Dataset ds;--------------------------------------1
//static Dataset ds;-----------------------------2

protected void page_load(parameters)
{
ds = function in Data acesss Layer which retrives records from database and returns dataset.
populatedatagrid();

}

void populatedatagrid()
{
if(mydropdownlist.selectedIndex=0)
datagrid1.datasource=ds;
else
{
datagrid1.Datasource= here I performed filtering action using Row Filter Property and selected Index Value
}
}

void mydropdownlist_selectedIndexchanged(parameters)
{
populatedatagrid();
}

I am designing a web page where by default all records will displayed.but by selecting from dropdownlist I can filter the records.Later I thought its not right to perform the fuctionalities of the page_load event at each postback(unnecessry making connection to the database)..so i used Page.Ispostback to avoid that..so first time it worked fine but when i selected from dropdwn list it throws an error "object reference not set to an instance of object"..
reason for above error i understood(because in page load event i am returning dataset which does not happened at page post back)..so one of my friend commented the line no-1 and uncommented the line no-2 in above code..thus made dataset static..and it works

What I am not understanding is why making the dataset static solved the task..though HTTP is static?Is making dataset ststic makes the records to be saved at server?

Warm Regards,
Rahul Agarwal


-- modified at 7:28 Tuesday 12th June, 2007
AnswerRe: Clarification On Static Member Pin
turbochimp12-Jun-07 11:05
turbochimp12-Jun-07 11:05 
QuestionMultiple Inheritances Pin
Neema Vikas11-Jun-07 23:20
Neema Vikas11-Jun-07 23:20 
AnswerRe: Multiple Inheritances Pin
Tarek Elganainy11-Jun-07 23:37
Tarek Elganainy11-Jun-07 23:37 
AnswerRe: Multiple Inheritances Pin
Kevin McFarlane12-Jun-07 1:07
Kevin McFarlane12-Jun-07 1:07 
Questionhow to lock a directory Pin
Hesham Yassin11-Jun-07 23:12
Hesham Yassin11-Jun-07 23:12 
AnswerRe: how to lock a directory Pin
Muammar©12-Jun-07 1:26
Muammar©12-Jun-07 1:26 
AnswerRe: how to lock a directory Pin
Sylvester george12-Jun-07 2:17
Sylvester george12-Jun-07 2:17 
AnswerRe: how to lock a directory Pin
shervin jijo12-Jun-07 2:21
shervin jijo12-Jun-07 2:21 
QuestionHow to get Remote Machine's hardware resources Pin
zinc_z11-Jun-07 23:03
zinc_z11-Jun-07 23:03 
AnswerRe: How to get Remote Machine's hardware resources Pin
Shy Agam12-Jun-07 2:19
Shy Agam12-Jun-07 2:19 
GeneralRe: How to get Remote Machine's hardware resources Pin
zinc_z12-Jun-07 2:28
zinc_z12-Jun-07 2:28 
GeneralRe: How to get Remote Machine's hardware resources Pin
Shy Agam12-Jun-07 2:57
Shy Agam12-Jun-07 2:57 
GeneralRe: How to get Remote Machine's hardware resources Pin
zinc_z12-Jun-07 7:55
zinc_z12-Jun-07 7:55 
GeneralRe: How to get Remote Machine's hardware resources Pin
Shy Agam12-Jun-07 8:54
Shy Agam12-Jun-07 8:54 
Questioncall .css file into c# Pin
matjame11-Jun-07 23:02
matjame11-Jun-07 23:02 
AnswerRe: call .css file into c# Pin
Colin Angus Mackay12-Jun-07 0:36
Colin Angus Mackay12-Jun-07 0:36 
GeneralRe: call .css file into c# Pin
matjame12-Jun-07 1:09
matjame12-Jun-07 1:09 

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.