Click here to Skip to main content
15,896,063 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: javascript doubt Pin
saravanan0512-Jun-07 1:35
saravanan0512-Jun-07 1:35 
AnswerRe: javascript doubt Pin
rreddy.V12-Jun-07 1:41
rreddy.V12-Jun-07 1:41 
AnswerRe: javascript doubt Pin
badgrs12-Jun-07 1:42
badgrs12-Jun-07 1:42 
AnswerRe: javascript doubt Pin
Christian Graus12-Jun-07 1:52
protectorChristian Graus12-Jun-07 1:52 
GeneralRe: javascript doubt Pin
Bajrang Singh13-Jun-07 5:11
Bajrang Singh13-Jun-07 5:11 
QuestionHow to Scroll while drag and drop in c# Pin
Sapan Roy12-Jun-07 0:52
Sapan Roy12-Jun-07 0:52 
AnswerRe: How to Scroll while drag and drop in c# Pin
Kushi Bobby12-Jun-07 1:44
Kushi Bobby12-Jun-07 1:44 
QuestionClarification On Static Member [modified] Pin
Rahul8312-Jun-07 0:47
Rahul8312-Jun-07 0:47 
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:11 Tuesday 12th June, 2007
AnswerRe: Clarification On Static Member Pin
rreddy.V12-Jun-07 1:18
rreddy.V12-Jun-07 1:18 
AnswerRe: Clarification On Static Member Pin
rreddy.V12-Jun-07 1:21
rreddy.V12-Jun-07 1:21 
GeneralRe: Clarification On Static Member Pin
Arun.Immanuel12-Jun-07 2:34
Arun.Immanuel12-Jun-07 2:34 
AnswerRe: Clarification On Static Member Pin
Arun.Immanuel12-Jun-07 2:51
Arun.Immanuel12-Jun-07 2:51 
GeneralRe: Clarification On Static Member Pin
Rahul8312-Jun-07 4:02
Rahul8312-Jun-07 4:02 
QuestionDropdown LIst Pin
sneha0112-Jun-07 0:38
sneha0112-Jun-07 0:38 
AnswerRe: Dropdown LIst Pin
Biju Sam12-Jun-07 0:50
Biju Sam12-Jun-07 0:50 
AnswerRe: Dropdown LIst Pin
_AK_12-Jun-07 0:53
_AK_12-Jun-07 0:53 
AnswerRe: Dropdown LIst Pin
koolprasad200312-Jun-07 0:54
professionalkoolprasad200312-Jun-07 0:54 
GeneralRe: Dropdown LIst Pin
sneha0112-Jun-07 0:57
sneha0112-Jun-07 0:57 
QuestionSys.Webforms.PageRequestManagerServerErrorException Pin
yogita charhate12-Jun-07 0:07
yogita charhate12-Jun-07 0:07 
AnswerRe: Sys.Webforms.PageRequestManagerServerErrorException Pin
Venkatesh Mookkan12-Jun-07 1:41
Venkatesh Mookkan12-Jun-07 1:41 
GeneralRe: Sys.Webforms.PageRequestManagerServerErrorException Pin
yogita charhate13-Jun-07 18:35
yogita charhate13-Jun-07 18:35 
GeneralRe: Sys.Webforms.PageRequestManagerServerErrorException Pin
hrajusb29-Aug-08 8:44
hrajusb29-Aug-08 8:44 
QuestionCustom DropDown Behaviour Pin
John Gathogo11-Jun-07 23:36
John Gathogo11-Jun-07 23:36 
QuestionASP.net [modified] Pin
ling_luv11-Jun-07 23:27
ling_luv11-Jun-07 23:27 
AnswerRe: ASP.net Pin
Biju Sam12-Jun-07 0:04
Biju Sam12-Jun-07 0:04 

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.