plz help to solve this prob

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Mar 2006
Posts: 11
Reputation: vaisakh is an unknown quantity at this point 
Solved Threads: 0
vaisakh vaisakh is offline Offline
Newbie Poster

plz help to solve this prob

 
0
  #1
Mar 28th, 2006
i created a session variable and try to call it on page load on another page the following error occur
: System.NullReferenceException: Object reference not set to an instance of an object.

code is


Session("name")=request(religion_list.selecteditem.text)
server.transfer("profile.aspx")

// then call

religion.selecteditem.Text = CStr(Session("name"))

Session.Remove("name")





plz help me to solve this
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 84
Reputation: web_developer is an unknown quantity at this point 
Solved Threads: 1
web_developer web_developer is offline Offline
Junior Poster in Training

Re: plz help to solve this prob

 
0
  #2
Mar 28th, 2006
man
why u use request object?
u can put the session equals to the religion list directly.

session("sdf") = religion_list.selecteditem.text
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 11
Reputation: vaisakh is an unknown quantity at this point 
Solved Threads: 0
vaisakh vaisakh is offline Offline
Newbie Poster

Re: plz help to solve this prob

 
0
  #3
Mar 28th, 2006
Originally Posted by vaisakh
i created a session variable and try to call it on page load on another page the following error occur
: System.NullReferenceException: Object reference not set to an instance of an object.

code is


Session("name")=request(religion_list.selecteditem.text)
server.transfer("profile.aspx")

// then call

religion.selecteditem.Text = CStr(Session("name"))

Session.Remove("name")





plz help me to solve this
thats ok but when i call this variable on another page the following error occur
: System.NullReferenceException: Object reference not set to an instance of an object.

how should i create the instance plz


religion.selecteditem.Text = CStr(Session("name"))

Session.Remove("name")
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 84
Reputation: web_developer is an unknown quantity at this point 
Solved Threads: 1
web_developer web_developer is offline Offline
Junior Poster in Training

Re: plz help to solve this prob

 
0
  #4
Mar 29th, 2006
man i think ur problem isnt in the session object but this one religion.selecteditem.Text

this object is it created in ur second page?

coz the error means u havent created an instance of object.

about the session, as i told u.
u can declare and create a one only by the following code:

session("x") = something

sam
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC