944,093 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 1732
  • ASP.NET RSS
Mar 28th, 2006
0

plz help to solve this prob

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
vaisakh is offline Offline
11 posts
since Mar 2006
Mar 28th, 2006
0

Re: plz help to solve this prob

man
why u use request object?
u can put the session equals to the religion list directly.

session("sdf") = religion_list.selecteditem.text
Reputation Points: 10
Solved Threads: 1
Junior Poster in Training
web_developer is offline Offline
84 posts
since Mar 2006
Mar 28th, 2006
0

Re: plz help to solve this prob

Quote 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")
Reputation Points: 10
Solved Threads: 0
Newbie Poster
vaisakh is offline Offline
11 posts
since Mar 2006
Mar 29th, 2006
0

Re: plz help to solve this prob

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
Reputation Points: 10
Solved Threads: 1
Junior Poster in Training
web_developer is offline Offline
84 posts
since Mar 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: COM+ error message
Next Thread in ASP.NET Forum Timeline: concatinate date values





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC