Click here to Skip to main content
15,886,026 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Export data to excel in asp.net Pin
Abhinav S27-Apr-15 19:00
Abhinav S27-Apr-15 19:00 
QuestionServer Side Code and Client Side Code Pin
King Fisher23-Apr-15 18:37
professionalKing Fisher23-Apr-15 18:37 
AnswerRe: Server Side Code and Client Side Code Pin
aarif moh shaikh24-Apr-15 0:10
professionalaarif moh shaikh24-Apr-15 0:10 
AnswerRe: Server Side Code and Client Side Code Pin
Kornfeld Eliyahu Peter26-Apr-15 20:32
professionalKornfeld Eliyahu Peter26-Apr-15 20:32 
QuestionHow do I assign Session value to label in Asp.net? Pin
samflex23-Apr-15 4:52
samflex23-Apr-15 4:52 
AnswerRe: How do I assign Session value to label in Asp.net? Pin
F-ES Sitecore23-Apr-15 22:37
professionalF-ES Sitecore23-Apr-15 22:37 
QuestionUse of LastOrDefault() Pin
Member 1096876723-Apr-15 0:16
Member 1096876723-Apr-15 0:16 
AnswerRe: Use of LastOrDefault() Pin
Richard Deeming23-Apr-15 2:05
mveRichard Deeming23-Apr-15 2:05 
You have two options:

1. Sort the data in descending order, and use FirstOrDefault:
C#
var cmpid = db.complaint_master
    .Where(m => m.uid == id && m.isvalid == 0 && m.dateofcomplaint == date)
    .Select(m => m.compid)
    .OrderByDescending(id => id)
    .FirstOrDefault()
;


2. Load all of the results into memory before using LastOrDefault:
C#
var cmpid = db.complaint_master
    .Where(m => m.uid == id && m.isvalid == 0 && m.dateofcomplaint == date)
    .Select(m => m.compid)
    .AsEnumerable()
    .LastOrDefault()
;




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


QuestionHow to encrypt message in WCF by writing code Pin
Tridip Bhattacharjee22-Apr-15 22:05
professionalTridip Bhattacharjee22-Apr-15 22:05 
AnswerRe: How to encrypt message in WCF by writing code Pin
Richard MacCutchan22-Apr-15 23:28
mveRichard MacCutchan22-Apr-15 23:28 
AnswerRe: How to encrypt message in WCF by writing code Pin
Gerry Schmitz24-Apr-15 16:08
mveGerry Schmitz24-Apr-15 16:08 
QuestionMultiple page redirection in ASP.NET WebApi Pin
Abdul Shakoor p22-Apr-15 20:34
Abdul Shakoor p22-Apr-15 20:34 
Questiondefault gridview listing not showing on page Pin
spirospap22-Apr-15 14:30
spirospap22-Apr-15 14:30 
AnswerRe: default gridview listing not showing on page Pin
Richard Deeming23-Apr-15 2:00
mveRichard Deeming23-Apr-15 2:00 
GeneralRe: default gridview listing not showing on page Pin
spirospap23-Apr-15 12:34
spirospap23-Apr-15 12:34 
Questionasp.net, c# Pin
Member 1124536521-Apr-15 16:28
Member 1124536521-Apr-15 16:28 
QuestionASP.Application is giving "An unhandled win32 exception occured in w3wp.exe The Just-In-Time debugger was launched without necessary security permissions" error Pin
indian14320-Apr-15 7:48
indian14320-Apr-15 7:48 
AnswerRe: ASP.Application is giving "An unhandled win32 exception occured in w3wp.exe The Just-In-Time debugger was launched without necessary security permissions" error Pin
indian14320-Apr-15 10:20
indian14320-Apr-15 10:20 
Questionquestion Pin
yousfi amina19-Apr-15 0:20
yousfi amina19-Apr-15 0:20 
AnswerRe: question Pin
Richard Andrew x6419-Apr-15 13:00
professionalRichard Andrew x6419-Apr-15 13:00 
QuestionHow to write to fileOutputStream mapped to physical file c# Pin
Tridip Bhattacharjee17-Apr-15 10:04
professionalTridip Bhattacharjee17-Apr-15 10:04 
QuestionRe: How to write to fileOutputStream mapped to physical file c# Pin
jkirkerx17-Apr-15 13:04
professionaljkirkerx17-Apr-15 13:04 
AnswerRe: How to write to fileOutputStream mapped to physical file c# Pin
Tridip Bhattacharjee18-Apr-15 7:48
professionalTridip Bhattacharjee18-Apr-15 7:48 
AnswerRe: How to write to fileOutputStream mapped to physical file c# Pin
jkirkerx19-Apr-15 12:09
professionaljkirkerx19-Apr-15 12:09 
QuestionMake image appear after div, and next dive appear after image Pin
indian14316-Apr-15 9:29
indian14316-Apr-15 9:29 

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.