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

ASP.NET

 
QuestionQuestion Event does not run when I click image that has event attached to it Pin
versm1ca4-Feb-14 22:21
versm1ca4-Feb-14 22:21 
AnswerRe: Question Event does not run when I click image that has event attached to it Pin
Deflinek5-Feb-14 0:48
Deflinek5-Feb-14 0:48 
GeneralRe: Question Event does not run when I click image that has event attached to it Pin
versm1ca5-Feb-14 7:19
versm1ca5-Feb-14 7:19 
GeneralRe: Question Event does not run when I click image that has event attached to it Pin
Richard Deeming5-Feb-14 8:15
mveRichard Deeming5-Feb-14 8:15 
GeneralCLOSED --- Re: Question Event does not run when I click image that has event attached to it Pin
versm1ca5-Feb-14 14:00
versm1ca5-Feb-14 14:00 
Questionradiobuttonlist change event with javascript Pin
ptvce4-Feb-14 1:21
ptvce4-Feb-14 1:21 
QuestionFlash Banner in Mobile asp.net Pin
Fcode-20143-Feb-14 21:28
Fcode-20143-Feb-14 21:28 
QuestionIf else structure problem Pin
Hunain Hafeez3-Feb-14 18:44
Hunain Hafeez3-Feb-14 18:44 
In if else structure when null arguments are passed to two string variables then it always hit the condition when i have set Var1 != "" && Var2 != "" why ? since nulls are passed to both then why it hits this condition ?


code:

C#
public ActionResult ShowCalTextBox(String DateFrom, String DateTo)
        {

           if (DateFrom != "" && DateTo == "")
            {
                IEnumerable<GetEmpRec_DateResult> EmpRec_DateFrom = DataContext.GetEmpRec_Date(DateFrom, null).ToList();
                ViewBag.Dates = "Records for"+" "+ DateFrom ;
                return View(EmpRec_DateFrom);

            }
            else if (DateFrom == "" && DateTo != "")
            {
                IEnumerable<GetEmpRec_DateResult> EmpRec_DateTo = DataContext.GetEmpRec_Date(null, DateTo).ToList();
                ViewBag.Dates = "Records for" + " " + DateTo;
                return View(EmpRec_DateTo);
            }
            else if (DateFrom != "" && DateTo != "")
            {
                IEnumerable<GetEmpRec_DateResult> EmpRec_ByDate = DataContext.GetEmpRec_Date(DateFrom, DateTo).ToList();
                ViewBag.Dates = "Records from" + " " + DateFrom +" "+"to"+" "+DateTo;
                return View(EmpRec_ByDate);
            }
            else if (DateFrom == "" && DateTo == "")
            {
                IEnumerable<GetEmpRec_DateResult> EmpRec_Default = DataContext.GetEmpRec_Date(null, null).ToList();
                ViewBag.Dates = "No date selection";
                return View(EmpRec_Default);
            }

            return View();
        }

it hits this one when i first browse this action or run this action.

else if (DateFrom == "" && DateTo != "")
AnswerRe: If else structure problem Pin
Kornfeld Eliyahu Peter3-Feb-14 20:17
professionalKornfeld Eliyahu Peter3-Feb-14 20:17 
QuestionRetry on duplicate keys ex Pin
byka3-Feb-14 6:50
byka3-Feb-14 6:50 
AnswerRe: Retry on duplicate keys ex Pin
Kornfeld Eliyahu Peter3-Feb-14 9:52
professionalKornfeld Eliyahu Peter3-Feb-14 9:52 
QuestionASP.Net Best Practices Pin
DotnetCoders0012-Feb-14 5:10
DotnetCoders0012-Feb-14 5:10 
AnswerRe: ASP.Net Best Practices Pin
Snehasish_Nandy2-Feb-14 19:12
professionalSnehasish_Nandy2-Feb-14 19:12 
GeneralRe: ASP.Net Best Practices Pin
Richard MacCutchan2-Feb-14 22:00
mveRichard MacCutchan2-Feb-14 22:00 
AnswerRe: ASP.Net Best Practices Pin
thatraja2-Feb-14 20:35
professionalthatraja2-Feb-14 20:35 
AnswerRe: ASP.Net Best Practices Pin
Kornfeld Eliyahu Peter2-Feb-14 22:14
professionalKornfeld Eliyahu Peter2-Feb-14 22:14 
QuestionProblems with Profiles ... Pin
Promised_Coming2-Feb-14 0:20
Promised_Coming2-Feb-14 0:20 
AnswerRe: Problems with Profiles ... Pin
Prasad Vj2-Feb-14 1:35
professionalPrasad Vj2-Feb-14 1:35 
AnswerRe: Problems with Profiles ... Pin
Richard Deeming3-Feb-14 2:20
mveRichard Deeming3-Feb-14 2:20 
QuestionBest Practise Pin
abhi_24311-Feb-14 16:55
professionalabhi_24311-Feb-14 16:55 
AnswerRe: Best Practise Pin
Peter Leow1-Feb-14 17:30
professionalPeter Leow1-Feb-14 17:30 
AnswerRe: Best Practise Pin
Prasad Vj1-Feb-14 22:12
professionalPrasad Vj1-Feb-14 22:12 
QuestionRadiobutton not fire an event.. Pin
Member 1051352931-Jan-14 23:09
Member 1051352931-Jan-14 23:09 
AnswerRe: Radiobutton not fire an event.. Pin
Prasad Vj1-Feb-14 21:50
professionalPrasad Vj1-Feb-14 21:50 
QuestionASP.NET MVC Pin
woopsydoozy31-Jan-14 4:59
woopsydoozy31-Jan-14 4:59 

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.