Buy Questpond's video subscriptions on
huge discount
.
Online: 3180
Home
Articles
Interviews
Forums
For Beginners
Popular Questions
ITIL Career Advice
PMP Career Advice
Career Advices
Codes
Videos
ASP.NET
ASP.NET MVC
Android Intel XDK
Sql Server
AngularJS
Bootstrap
Backbone.JS
MongoDB
LESS (CSS)
jQuery
WPF
WWF
SSIS
LightSwitch
Tutorials
News
ASP.NET MVC
|
Be Interview Ready
|
Top Performers
|
DNF MVP
|
Top Posts
|
Winners
|
Subscribe
|
Catalogs
Welcome Guest !
Register
Login
Home
>
Forums
>
C#
>
Loading ...
unable to find Dropdown list data
Posted by
Swaroopa
under
C#
on 6/29/2012 |
Points: 10
| Views : 1522 | Status :
[Member]
| Replies : 4
Write New Post
|
Search Forums
|
Resolved Posts
|
Un Answered Posts
|
Forums Home
Hi,
Based on session value finding dropdownlist data , getting error
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Swaroopa
Reply
|
Reply with Attachment
Alert Moderator
Responses
Posted by:
Jeffie
on: 6/29/2012
[Member]
Starter
|
Points: 25
0
Hi Can you post the code implemented for this.
In order to catch the exception you can go a condition if session is not null
Thanks
http://www.alacraft.com.au/
Swaroopa
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Ranjeet_8
on: 6/29/2012
[Member]
[MVP]
Gold
|
Points: 25
0
Hi,
post your code.
check your session varriable. i think, it will throw null value.
Swaroopa
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Anu.Malik
on: 7/4/2012
[Member]
Starter
|
Points: 25
0
Hi,
When we want to select any value in dropdown then it must be check first the value is exsits or not in dropdownlist.
And When we use any session variable first need to check session is not null or empty.
ex.
if (!(String.IsNullOrEmpty(Convert.ToString(Session["value"]))))
{
if (ddl.Items.FindByValue(Session["value"]) != null)
{
ddl.SelectedValue =Session["value"]) ;
}
}
Thanks & Regards ,
Anu Malik
Swaroopa
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Patel28rajendra
on: 7/5/2012
[Member]
Starter
|
Points: 25
0
Hi
I think your session value is null so that you are getting this error please first put condition for Session is null or not
Then set dropdown Selected Value
Thanks
R D Patel
Swaroopa
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Login to post response
Latest Posts
Istikhara ka Tarika Dawateislami
(0)
How to get the exact property name while getting error
(0)
PDB file is not showing Line Number in dot net application hosted on server
(0)
Both Strings morethan 5 letters in length end of the words one vowel and one consonent is different
(0)
how to check Any adjacent letters transposed between two strings(ex: JOHN, JHON)
(1)
can't receive data after success login ?
(1)
Implement Multi-Tenant in Azure Logic Apps
(0)
Why ASP.Net Core 7.0 Web API showing as Connection refused?
(0)
More ...