Click here to Skip to main content
15,885,216 members
Home / Discussions / C#
   

C#

 
Questionobject reference not set to an instance of an object Pin
surya 20132-Apr-13 18:50
surya 20132-Apr-13 18:50 
AnswerRe: object reference not set to an instance of an object Pin
Chinmaya C2-Apr-13 19:24
Chinmaya C2-Apr-13 19:24 
QuestionRe: object reference not set to an instance of an object Pin
surya 20132-Apr-13 22:31
surya 20132-Apr-13 22:31 
AnswerRe: object reference not set to an instance of an object Pin
Chinmaya C2-Apr-13 22:42
Chinmaya C2-Apr-13 22:42 
GeneralRe: object reference not set to an instance of an object Pin
surya 20133-Apr-13 3:05
surya 20133-Apr-13 3:05 
GeneralRe: object reference not set to an instance of an object Pin
Chinmaya C3-Apr-13 18:03
Chinmaya C3-Apr-13 18:03 
GeneralRe: object reference not set to an instance of an object Pin
surya 20133-Apr-13 18:39
surya 20133-Apr-13 18:39 
AnswerRe: object reference not set to an instance of an object Pin
Simon_Whale3-Apr-13 3:17
Simon_Whale3-Apr-13 3:17 
you need to check the value of the UserID

C#
string UserID = Session["UserID"].ToString();


I would put this before the LinQ statement and put a breakpoint on it, step over that line and then see what if any value UserID holds. So change your code to

C#
string UserID = Session["UserID"].ToString(); //put breakpoint on this line
var Inquser = from  u in lstusers where u.User_ID == int.Parse(Session["UserID"].ToString()) && u.Pass_word == txtopwd.Text.Trim();

Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch

AnswerRe: object reference not set to an instance of an object Pin
Pete O'Hanlon3-Apr-13 6:54
mvePete O'Hanlon3-Apr-13 6:54 
QuestionC# BITMAP to Binary.. Pin
정성만2-Apr-13 16:07
정성만2-Apr-13 16:07 
AnswerRe: C# BITMAP to Binary.. Pin
Richard MacCutchan2-Apr-13 22:01
mveRichard MacCutchan2-Apr-13 22:01 
AnswerRe: C# BITMAP to Binary.. Pin
Eddy Vluggen3-Apr-13 7:05
professionalEddy Vluggen3-Apr-13 7:05 
Questionerror in query with 2 tables in c# visual studio 2010 Pin
User34902-Apr-13 9:40
User34902-Apr-13 9:40 
AnswerRe: error in query with 2 tables in c# visual studio 2010 Pin
Pete O'Hanlon2-Apr-13 10:12
mvePete O'Hanlon2-Apr-13 10:12 
GeneralRe: error in query with 2 tables in c# visual studio 2010 Pin
User34902-Apr-13 11:04
User34902-Apr-13 11:04 
GeneralRe: error in query with 2 tables in c# visual studio 2010 Pin
Pete O'Hanlon2-Apr-13 11:14
mvePete O'Hanlon2-Apr-13 11:14 
GeneralRe: error in query with 2 tables in c# visual studio 2010 Pin
User34902-Apr-13 11:35
User34902-Apr-13 11:35 
GeneralRe: error in query with 2 tables in c# visual studio 2010 Pin
Pete O'Hanlon2-Apr-13 11:39
mvePete O'Hanlon2-Apr-13 11:39 
GeneralRe: error in query with 2 tables in c# visual studio 2010 Pin
User34902-Apr-13 11:47
User34902-Apr-13 11:47 
GeneralRe: error in query with 2 tables in c# visual studio 2010 Pin
Pete O'Hanlon2-Apr-13 11:50
mvePete O'Hanlon2-Apr-13 11:50 
GeneralRe: error in query with 2 tables in c# visual studio 2010 Pin
User34902-Apr-13 12:00
User34902-Apr-13 12:00 
GeneralRe: error in query with 2 tables in c# visual studio 2010 Pin
Ravi Bhavnani4-Apr-13 6:18
professionalRavi Bhavnani4-Apr-13 6:18 
GeneralMessage Closed Pin
4-Apr-13 10:21
User34904-Apr-13 10:21 
GeneralRe: error in query with 2 tables in c# visual studio 2010 Pin
Ravi Bhavnani4-Apr-13 11:50
professionalRavi Bhavnani4-Apr-13 11:50 
SuggestionRe: error in query with 2 tables in c# visual studio 2010 Pin
ROHIT SRIVASTAVA3-Apr-13 2:58
ROHIT SRIVASTAVA3-Apr-13 2:58 

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.