(#5) What is Controller in MVC | Controllers in MVC 5 | MVC Tutorial for Beginners in .net c#

Поділитися
Вставка
  • Опубліковано 28 вер 2024
  • MVC Tutorial: What is controller in MVC?
    We will start this video from What is controller in MVC? Controllers are the main building blocks of any mvc 5 application. We can not imagine any mvc application without controller.
    This video will cover lots of thins about controllers in mvc.
    First we will learn what is controller so that we will be familiar about basics of mvc controller. Then we will learn how to add a new controller (empty or with read-write action methods). This will give us a new controller in our application. Inside a controller there are multiple public methods. These methods are called as Action methods. Action methods are responsible for returning different types of action results from controller.
    We will also learn how can we pass parameters from browser (client) to controller (server) with the help of query string.
    We will start by passing 1 parameter and then we will pass multiple parameters to controller.
    Timestamp -
    Objective of this video 00:16
    What is controller in mvc 01:23
    What is the use/role of controller 04:34
    Definition of controller 08:07
    How to create/ add a new controller 09:23
    What is Action Method in mvc 15:50
    How to call Action Method from browser 18:06
    How to pass parameters in controller's Action Method 23:10
    And most important - How will you decide when to create new controller and when to use the existing one 37:25
    #mvctutorial #controllerinmvc #MVC
    Subscribe WebGentle: goo.gl/PJr1pN
    Visit Our Website: www.webgentle.com
    Join WebGentle Community: www.webgentle....
    Visit WebGentle Blog: www.webgentle....
    For business enquiry contact: nitish.webgentle@gmail.com
    Follow us on
    ==========
    Facebook - / webgentle
    Linkedin - / webgentle
    Twitter - / webgentle
    Popular free courses from WebGentle
    =========
    Jira tutorial - bit.ly/jiratuto...
    Azure DevOps tutorial - bit.ly/azuredev...
    .NET Core 3.0 fundamentals - bit.ly/dotnetcore3
    MVC5 tutorial - bit.ly/mvcbynitish
    LINQ Tutorial - bit.ly/linqbyni...
    Non generic collection in C# - bit.ly/nongener...

КОМЕНТАРІ • 169

  • @WebGentle
    @WebGentle  4 роки тому +9

    Timestamp -
    # Objective of this video 00:16
    # What is controller in mvc 01:23
    # What is the use/role of controller 04:34
    # Definition of controller 08:07
    # How to create/ add a new controller 09:23
    # What is Action Method in mvc 15:50
    # How to call Action Method from browser 18:06
    # How to pass parameters in controller's Action Method 23:10
    # And most important - How will you decide when to create new controller and when to use the existing one 37:25
    #mvctutorial #controllerinmvc #MVC
    Subscribe WebGentle: goo.gl/PJr1pN
    Visit Our Website: www.webgentle.com
    Join WebGentle Community: www.webgentle.com/community
    Visit WebGentle Blog: www.webgentle.com/blogs

  • @KhushbooChauhan-hc9zn
    @KhushbooChauhan-hc9zn 3 місяці тому

    This is amazing tutorials, get basic to advance knowledge of MVC, Thanku so much sir

  • @sachindwivedi611
    @sachindwivedi611 5 років тому +23

    correct output :
    public string FullName(string first, string last)
    {
    if (!string.IsNullOrEmpty(first) && string.IsNullOrEmpty(last))
    return "Your First Name is = " + first;
    else if (string.IsNullOrEmpty(first) && !string.IsNullOrEmpty(last))
    return "Last Name is = " + last;
    else
    return "Your First Name is = " + first + "And Last Name is = " + last;
    }

    • @saroshfaisalkhan3531
      @saroshfaisalkhan3531 3 роки тому

      public string FullName(string? firstname=null, string? lastname=null ){...} why can't we use this procedure?

    • @Ajay-cv1zs
      @Ajay-cv1zs 2 роки тому

      @@saroshfaisalkhan3531 becoz string are reference type and nullable

    • @ryuzaki6865
      @ryuzaki6865 2 роки тому

      You have missed another condition, if the user doesn't pass either "first" or "last".

    • @AnupMishra-ki7oe
      @AnupMishra-ki7oe Рік тому

      @@saroshfaisalkhan3531 how can you predict input in run time ? you have to display only last name if there is no first name is declared. if you use this method it will still show first name =
      lastname = something

  • @navinsingh1423
    @navinsingh1423 3 роки тому +1

    Very nice explanation sir.

  • @Ujjwalchhabra1
    @Ujjwalchhabra1 Рік тому

    Thanks for helping me out. Really good tutorials.

  • @altitudekillers6140
    @altitudekillers6140 3 роки тому +1

    Thanks for Teaching

  • @hammadhussain8237
    @hammadhussain8237 3 роки тому +9

    Bohat shukriya bhai me institute ke sath sath extra learning apke daily tutorial dekh kr krta hn or implement b love form Pakistan ❤

  • @AmaanKhan-qq4ot
    @AmaanKhan-qq4ot 4 роки тому +1

    Amazing Explanation

  • @universallove8970
    @universallove8970 2 роки тому

    Amazing Teaching Technique Thank You Sir

  • @gauravrajpurohit522
    @gauravrajpurohit522 2 роки тому

    Timing 27:30 jb hm url m I'd ki value 1 put kr re the to wo uske bad ridrect kaise kr ra hai ,,, mere p I'd ki value store nhi hori ,, jb m url m I'd ki value =1 dal ra hu n hit enter kr ra hu to redirect nhi hora n value bhi store nhi hori

  • @Muhammadyaseen-hx3ej
    @Muhammadyaseen-hx3ej 2 роки тому

    sir jab ma visual studio ma variable k uper mouse la k ata ho tab jo value pass ke hoti ha browser sa wo show nhi hoti??
    I am using visual studio 2022 professional

  • @tajuddinidrisi6610
    @tajuddinidrisi6610 2 роки тому

    Very helpful video to understand

  • @swapnilmahajan7139
    @swapnilmahajan7139 Рік тому

    Ausome teaching sir

  • @aishwaryaaggarwal9438
    @aishwaryaaggarwal9438 2 роки тому

    Awesome

  • @amardeogade6026
    @amardeogade6026 3 роки тому +1

    very nice understanding!

  • @minionrock2568
    @minionrock2568 5 років тому +1

    Very nice..learnt a lot

  • @entertainmentforpeople1683
    @entertainmentforpeople1683 4 роки тому +2

    Server Error in '/' Application.
    The resource cannot be found.
    Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
    Requested URL: /
    how to solve this error in visual studio 2019

  • @bhojpuristatus9.0
    @bhojpuristatus9.0 Рік тому +1

    Answer :-
    //question 1 --------->>>>>>>>>>>>>>>>>>>>>>>>
    public string name()
    {
    return "webgentle";
    }
    //question 2 --------->>>>>>>>>>>>>>>>>>>>>>>>
    public string fullname(string firstName, string lastName)
    {
    if (firstName != null && lastName != null)
    {
    return "FIRSTNAME AND LASTNAME = " + firstName + " " + lastName;
    }
    else if (firstName != null)
    {
    return "FIRSTNAME = " + firstName;
    }
    else if (lastName != null)
    {
    return "LASTNAME = " + lastName;
    }
    return "not found";
    }

  • @rajeevsingh-fg6in
    @rajeevsingh-fg6in 11 місяців тому

    Nice❤

  • @bhaktirasamritam5130
    @bhaktirasamritam5130 6 років тому

    Sir mere system me profile id wala output wahi de raha hai jo return me de raha tha, employee 1 profile nahi de raha hai

  • @dhruvipatel6008
    @dhruvipatel6008 2 роки тому

    Hello sir, how to separate the code from controller to make controller more clean ?

  • @rajeevprajapati159
    @rajeevprajapati159 2 місяці тому

    Sir data Lake nahi show ho raha hai
    Sir id 1 and 2 nahi aa raha hai

  • @anserbutt699
    @anserbutt699 6 років тому +4

    bro, nicely explained .....
    but i am stuck in assignment you given in this lecture, because you taught us how to put nullable (int only) but what if its a string??
    tell me how to make string as nullable ? i have tried this :
    public string Name(string? fName=null,string? lName=null)
    {
    //code
    }

    • @WebGentle
      @WebGentle  6 років тому +2

      You can assign null value directly to a string.

    • @WebGentle
      @WebGentle  6 років тому +1

      There is no need to use ? for string.

    • @ayantechno5365
      @ayantechno5365 6 років тому

      Thanks :)

  • @easytechnique7324
    @easytechnique7324 3 роки тому +1

    well done bro!

  • @savitadevi5192
    @savitadevi5192 5 років тому +1

    Sir what if I don't have the preceding text of "controller" in my controller class name, will it still functional @s controller?

    • @savitadevi5192
      @savitadevi5192 5 років тому

      Please answer this question, this was asked in one interview.

    • @WebGentle
      @WebGentle  5 років тому

      Try it and post your answer.

  • @komal7186
    @komal7186 2 роки тому

    What is scaffolding

  • @rashminavora6268
    @rashminavora6268 3 роки тому

    Anybody got A nice job

  • @umerfarooq1538
    @umerfarooq1538 4 роки тому

    can a get all the slides?

  • @Sandeep37g
    @Sandeep37g 5 років тому +1

    Thank you...sir

  • @abhijeetjha9414
    @abhijeetjha9414 3 роки тому

    How to enable nullable reference

  • @minionrock2568
    @minionrock2568 5 років тому +1

    Keep posting new videos.

  • @justrelex9022
    @justrelex9022 6 років тому

    very nice Explaynation

  • @balwindersinghsohi
    @balwindersinghsohi 5 років тому

    Nice .. Thanks

  • @pradyumnamishra7114
    @pradyumnamishra7114 3 роки тому

    Hey... Employe/EmployeProfile?id=1 didn't show? When I move my cursor in (int id).. Could you please let me know

  • @shivatiwari1127
    @shivatiwari1127 4 роки тому

    Grt

  • @asifsomi
    @asifsomi 4 роки тому

    can we have any name for controler cs file?

  • @fardinjamanaranyak6350
    @fardinjamanaranyak6350 Рік тому +2

    public class GameController : Controller
    {
    public String Name(String name)
    {
    return "Welcome to " + name;
    }
    public String FullName(String first, String last)
    {
    if (first != null && last != null)
    {
    return "Your First Name = " + first + " And Your last Name = " + last;
    }
    else if (first != null)
    {
    return "Your First Name = " + first;
    }
    else if(last != null)
    {
    return "Your Last Name = " + last;
    }
    return "What is Your Name?!";
    }
    }

  • @justrelex9022
    @justrelex9022 6 років тому

    very nice bro

  • @shanmohammad5051
    @shanmohammad5051 4 роки тому

    public class HomeController : Controller
    {
    public string Index()
    {
    return "Hello";
    }
    public string FullName(string Firstname, string Lastname)
    {
    string name = string.Empty;
    if(Firstname!=null && Lastname!=null)
    {
    name="Your first name is = "+ Firstname +" "+"and"+" "+ "Last Name is= " + Lastname;
    }
    else if(Firstname!= null && Lastname==null)
    {
    name = "Your First Name is="+ Firstname;
    }
    else if (Firstname == null && Lastname != null)
    {
    name = "Your last Name is=" + Lastname;
    }
    return name;
    }
    Its working but can you please tell me how can i make this code really short?

  • @mianmubashir2930
    @mianmubashir2930 4 роки тому

    sir ap is m programming language c# use kr rhy hen?

  • @muzammilyousuf777
    @muzammilyousuf777 4 роки тому

    Sir voice problem bohat slow hai☹️

  • @tejajavvaji1902
    @tejajavvaji1902 4 роки тому

    is there any azure devops tutorial

    • @WebGentle
      @WebGentle  4 роки тому +1

      Yes, Please watch here:
      ua-cam.com/play/PLaFzfwmPR7_Ifxq-udm66fhReFeGOe2x_.html

  • @sandeeppillai2890
    @sandeeppillai2890 3 роки тому +1

    public string FullName(string first = null, string last= null)
    {
    if (first==null && last !=null)
    {
    return "Your last name is : " + last;
    }
    else if (last == null && first !=null)
    {
    return "Your first name is : " + first;
    }
    else
    {
    return "Your first name is : " + first + " And last name : " + last;
    }
    }

  • @dipeswarsi1785
    @dipeswarsi1785 5 років тому +1

    public string Name(string name)
    {
    return "Welcome to " + name;
    }
    public string FullName(string first, string last)
    {
    if(first==null)
    {
    return "Your lastName is " + last;
    }
    else if(last==null)
    {
    return "Your firstName is " + first;
    }
    else
    return "Your firstName is " + first + " and lastName is " + last;
    }

  • @GoogleUser-nx3wp
    @GoogleUser-nx3wp Рік тому

    🥰🥰🥰🥰

  • @microcomputertrainingcente4788
    @microcomputertrainingcente4788 9 місяців тому

    public class GameController : Controller
    {
    public string Name (string name)
    {
    return "Welcome to " + name;
    }
    public string FullName(string? first = "firstName" , string? last = "lastName")
    {
    return "Your first name is = " + first + " and last name is = " + last + "
    " + " Your first name is = " + first + "
    " + " Your last name is = " + last;
    }
    }

  • @sohaibahmad6921
    @sohaibahmad6921 4 роки тому

    at 11:46 i name it webapplication3 but your is webapplication2

  • @priyankasenapati6869
    @priyankasenapati6869 2 роки тому

    public class GameController : Controller
    {
    public string Name(string name)
    {
    return " Welcome to " + name;
    }
    public string FullName(string first, string last)
    {
    if (last == null)
    {
    return " My First Name is=" + first;
    }
    else if(first == null)
    {
    return " My Last Name is=" + last;
    }
    else
    {
    return " My First Name is =" + first + " and My Last Name is =" + last;
    }

    }

  • @chavananand23
    @chavananand23 5 років тому

    public string Address(int? i=null, int? Dept=null)
    {
    if(i==null)
    {
    return "Student Departname is " + Dept;
    }
    else if(Dept==null)
    {
    return "Student Id = " + i;
    }
    else
    {
    return "id = " + i + "and Department = " + Dept;
    }
    }
    localhost:8555/employee/Address?i=10
    output: Student Id = 10
    But,
    localhost:8555/employee/Address?dept=sci
    output : Student Departname is

  • @omkkarpotddar5663
    @omkkarpotddar5663 5 років тому

    public string Info(string? strFname = null, string? strLname = null)
    {
    return "First Name = " + strFname + " Last Name = " + strLname;
    }
    ===========
    Its Not work..

    • @rakeshgali
      @rakeshgali 5 років тому

      public string FullName(string first, string last)
      {
      if (!string.IsNullOrEmpty(first) && string.IsNullOrEmpty(last))
      return "Your First Name is = " + first;
      else if (string.IsNullOrEmpty(first) && !string.IsNullOrEmpty(last))
      return "Last Name is = " + last;
      else
      return "Your First Name is = " + first + "And Last Name is = " + last;
      }

  • @gouravtike4559
    @gouravtike4559 4 роки тому

    public string FullName(string Fname,string Lname)
    {
    if(string.IsNullOrEmpty(Fname))
    {
    return "Your Last name = " + Lname;
    }
    else if(string.IsNullOrEmpty(Lname))
    {
    return "Your First name = " + Fname;
    }
    else
    {
    return "Your First name = " + Fname + " and Last name = " + Lname;
    }

    }

  • @NandLal-uk5ju
    @NandLal-uk5ju 5 років тому

    public class GameController : Controller
    {
    // GET: Game
    public string Name(string name)
    {
    return "Well come to " + name;
    }
    public string Fullname(string fname, string lname)
    {

    string html;
    if (! String.IsNullOrEmpty(fname) && !String.IsNullOrEmpty(lname))
    {
    html = "Your firstname : "+fname+" And lastname :"+lname;
    }
    else if (!String.IsNullOrEmpty(fname))
    {
    html = "Your firstname : " + fname;
    }
    else if(!String.IsNullOrEmpty(lname))
    {
    html = "lastname :" + lname;
    }
    else
    {
    html = " no data found";
    }
    return html;
    }
    }

  • @Rajdeep11082
    @Rajdeep11082 3 роки тому

    public string EmployeeName(string firstname="", string lastname="")
    {
    if (firstname.Length>1 && lastname.Length==0)
    {
    return "your firstname is " + firstname;
    }else if (lastname.Length > 1 && firstname.Length==0)
    {
    return "your lastname is " + lastname;
    }
    else
    {
    return "your firstname is " + firstname + " your last name is " + lastname;
    }
    }

  • @ahmadhussainvloger2005
    @ahmadhussainvloger2005 Рік тому

    EXCUSE ME SIR

  • @sajnimatrimony3299
    @sajnimatrimony3299 5 років тому

    public string Name(string name)
    {
    if(name== "RajAppStore")
    {
    return "Welcome to RajAppStore";
    }
    else
    {
    return "No record found";
    }

    }
    public string FullName(string firstname, string lastname)
    {
    if(firstname!=null && lastname!=null)
    {
    return "Your First Name is = " + firstname + " Your Last Name is = " + lastname;
    }
    else if(firstname != null)
    {
    return "Your First Name is = " + firstname;
    }
    else
    {
    return " Your Last Name is = " + lastname;
    }

    }

  • @sohaibahmad6921
    @sohaibahmad6921 4 роки тому

    voice very slow

  • @entertainmentforpeople1683
    @entertainmentforpeople1683 4 роки тому

    please sir check my question is right
    // your first questions
    public string Name(string Fname)
    {
    return " welcome To "fname;
    }
    //your secound questions
    public string FullName(string Firstnam = null, string lastname = null)
    {
    if (Firstnam == null && lastname == null)
    {
    return "this is empty";
    }
    else if (lastname == null)
    {
    return " this is a first Name : " + Firstnam;
    }
    else if (Firstnam == null)
    {
    return "this is a last name :" + lastname;
    }
    else
    {
    return "firstname :" + Firstnam + "last name " + lastname;
    }
    }

    • @WebGentle
      @WebGentle  4 роки тому

      What if the value of fname or lname is empty i.e "".

  • @pranayprabhu3284
    @pranayprabhu3284 4 роки тому

    too much ads

  • @akashgupta2971
    @akashgupta2971 5 років тому +1

    using System.Linq;
    using System.Web.Mvc;
    namespace WebGentleControllers.Controllers
    {
    public class GameController : Controller
    {
    public ActionResult Index()
    {
    return View();
    }
    public string Name(string name)
    {
    return "Welcome to " +name;
    }
    public string FullName(string firstName = "", String lastName = "")
    {
    if (string.IsNullOrEmpty(firstName))
    return "Your Lastname is = " + lastName;
    else if (string.IsNullOrEmpty(lastName))
    return "Your Firstname is = " + firstName;
    else
    return "Your Firstname is = " + firstName + " and Lastname is = " + lastName;
    }
    }
    }

  • @arfeenkhan2831
    @arfeenkhan2831 4 роки тому +1

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.Mvc;
    namespace WebApplication6.Controllers
    {
    public class GameController : Controller
    {
    // GET: Game
    public string Name(string Name)
    {
    return "Welcome to"+Name;
    }
    public string FullName(string FirstName, string LastName)
    {
    return "Your First Name is" + FirstName + "Last Name is" + LastName;
    }
    }
    }

  • @sanjayverma-cp2yx
    @sanjayverma-cp2yx 3 роки тому

    Hi Sir, is my answer correct ? see below code.
    public string FullName(string first = null, string last = null)
    {
    string name = string.Empty;
    if (first != null && last != null)
    {
    name = "Your First name is " + first + " and last name is " + last;
    }
    else if(last == null && first !=null)
    {
    name = "Your First name is " + first;
    }
    else if (last != null && first == null)
    {
    name = "Your Last name is " + last;
    }
    else
    {
    name = "nothing";
    }
    return name;
    }

  • @urjitsingh2020
    @urjitsingh2020 Рік тому

    public string Name(string name)
    {
    return " Welcome To "+ name ;
    }
    public string FullName(string firstname,string lastname)
    {
    if(!string.IsNullOrEmpty(firstname) && string.IsNullOrEmpty(lastname))
    {
    return "Your First Name is =" + firstname;
    }
    else if(string.IsNullOrEmpty(firstname)&& !string.IsNullOrEmpty(lastname))
    {
    return "Your Last Name is =" + firstname;
    }
    else
    return " Your First Name is = " + firstname + "and last Name is = " + lastname;
    }

  • @ishantkushwaha534
    @ishantkushwaha534 4 роки тому +4

    public string FullName(string first,string last) //NO ERROR -- IF ONLY ONE PARAMETER IS PASS
    { // (STRING)
    if (first == null)
    return "Your last name is " + last;
    else if(last == null)
    return "Your first name is " + first;
    else
    return "Your first name is " + first+ " and Your last name is " + last;
    }

  • @ashutoshsingh5568
    @ashutoshsingh5568 6 років тому +9

    Very nicely explained.
    I've been through many tutorials but didn't find better than this MVC tutorial.
    Thanks!

    • @WebGentle
      @WebGentle  6 років тому +6

      +Ashutosh Singh Thanks.
      Please like and share the video so that others can also learn.
      Keep learning.

  • @pawansingh_1000
    @pawansingh_1000 5 місяців тому +1

    voice bhut slow hai yaar,laptop ki voice full hai phir bhi nahi aar rahi ..

  • @2MinutesEngineering
    @2MinutesEngineering 4 роки тому +4

    public class GameController : Controller
    {
    public string Name(string name)
    {
    return "Welcome to " + name;
    }
    public string FullName(string first,string last)
    {
    if(first == null)
    {
    return "your last name is = " + last;
    }
    else if(last == null)
    {
    return "your first name is = " + first;
    }
    else
    {
    return "your first name is = " + first + ", your last name is = " + last;
    }
    }
    }

  • @arunvishwakarma711
    @arunvishwakarma711 3 роки тому +2

    Please use zoom while doing coding videos,code fonts are very small and not able to see properly

  • @mohammedmudassir837
    @mohammedmudassir837 5 років тому +5

    well structured and nicely explained !!

  • @techsupport2015
    @techsupport2015 5 років тому +4

    You are doing a great job. Your methodology is very genius and easily understandable.

  • @Saurabhsingh-cj5gq
    @Saurabhsingh-cj5gq Рік тому +2

    Speak loudly

  • @anuragmohanty1301
    @anuragmohanty1301 5 років тому +3

    Kya tutorial hai sir maja ageya...Superb

  • @bilaljaved1900
    @bilaljaved1900 6 років тому +1

    public string Fullname(string number_1 = null, string number_2 = null)
    {
    if (number_1 != null && number_2 != null)
    {
    return "your first name is " + number_1 + " and last name is " + number_2;
    }
    else if (number_1 != null && number_2 == null)
    {
    return "your first name is " + number_1;
    }
    else if (number_1 == null && number_2 != null)
    {
    return "your first name is " + number_2;
    }
    else
    {
    return "provide atleast one argument";
    }
    }

    • @WebGentle
      @WebGentle  6 років тому

      Nice try but you can improve it. :)

  • @bilaljaved1900
    @bilaljaved1900 6 років тому +3

    public string Name(string name)
    {
    return "welcome to " + name;
    }

  • @ajsoft
    @ajsoft 3 роки тому +1

    how can make string Type Nullable or opetional?

  • @nabeelfootballwala
    @nabeelfootballwala 5 років тому +3

    very amazing playlist I appreciate your hard work

  • @techypartner8308
    @techypartner8308 5 років тому

    I add this method:
    public string TestName(string firstName, string lastName)
    {
    return firstName+" "+lastName;
    }
    Even I did not pass a single parameter through URL, it does not show me the error?? how its auto nullable parameters?? I am using MVC template while creating the project - is MVC framework automatically manage it, or there is an issue with my method? please suggest.

  • @Ajaykumar-ky6mv
    @Ajaykumar-ky6mv 4 роки тому +2

    thank you so much sir this tutorial

  • @diptoneogi7779
    @diptoneogi7779 2 роки тому +1

    sir you are great.....nice explanation

  • @CryptoKaGyan4u
    @CryptoKaGyan4u 3 роки тому

    Your voice look to lazy please make interactive video . content is good

  • @ddshahi19
    @ddshahi19 6 років тому +1

    Can we make the Quiz by using MVC 5 . If you have any ideas please send me the ideas.

  • @mohibhero3982
    @mohibhero3982 5 років тому +2

    Really great tutorial. Lots of respect for you sir. Thank You.

  • @atthalil4933
    @atthalil4933 3 роки тому

    public string Game(String FristName, string LastName = null)
    {
    if (LastName == null && FristName != "")
    return "Welcome To " + FristName;
    else
    return "Frist Name " + FristName + " And " + " Last Name " + LastName;
    }
    this is right or wrong ? Sir .

  • @priyambharti155
    @priyambharti155 5 років тому +2

    Very well taught 👌👍👍thankyou sir

  • @Mrhow7
    @Mrhow7 Рік тому

    public string FullName(string FName=null, string LName=null)
    {
    string name = string.Empty;
    if(FName==null)
    {
    return "lasttname=" + LName;
    }
    else if(LName==null)
    {
    return "firstname=" + FName;
    }
    else
    return "first name="+FName+ "and last name =" + LName;
    }

  • @basheerkhn
    @basheerkhn 5 років тому

    Answer for the homework quiz
    public string FullName(string first, string last)
    {
    if (first=="firstname" && string.IsNullOrEmpty(last))
    {
    return "Your First Name= "+first;
    }
    else if(last == "lastname" && string.IsNullOrEmpty(first))
    {
    return "Your last name= " + last;
    }
    else if(first == "firstname" && last=="lastname")
    {
    return "Your first name is = "+first+ " and last name = " + last;
    }
    else
    {
    return "plz enter a valid name";
    }

    }

  • @rupok3393
    @rupok3393 2 роки тому

    public class GameController : Controller
    {
    public String Name(String name)
    {
    return "Welcome to " + name;
    }
    public String FullName(String firstName, String lastName)
    {
    if(firstName==null && lastName != null)
    {
    return "your last name is = " + lastName;
    }
    else if(firstName != null && lastName == null)
    {
    return "your first name is = " + firstName;
    }
    else
    {
    return "your first name is = " + firstName + "and last name is = " + lastName;

    }
    }
    }

  • @1rfan_saeed
    @1rfan_saeed 3 роки тому

    public string FullName(string First, string Last)
    {
    if (First == null)
    {
    return " Your Last Name is " + Last;
    }
    else if (Last == null)
    {
    return "Your First Name is " + First;
    }
    else
    {
    return "Your First Name is " + First + "and Your Last Name is " + Last;
    }
    }

  • @sandeeppillai2890
    @sandeeppillai2890 3 роки тому +1

    Please also add subtitle for your videos ... It is very nice

  • @NandLal-uk5ju
    @NandLal-uk5ju 5 років тому +1

    dear sir empty string check krne k lie 2sra koe method he??

    • @WebGentle
      @WebGentle  5 років тому

      string.IsNullOrEmplt

  • @seemagupta4612
    @seemagupta4612 3 роки тому +1

    Very nice explained

  • @MuhammadRizwan-uy4ki
    @MuhammadRizwan-uy4ki 2 роки тому

    Sir jb main controller add kr rha hn mery pass script fonts waly kuch folder nj arhe mv. Empty main

  • @accuracy4391
    @accuracy4391 Рік тому

    Thankyou so much sir.

  • @asmitanair4977
    @asmitanair4977 5 років тому +1

    Can you provide some thoery notes of that??

  • @muhammadsami9823
    @muhammadsami9823 5 років тому +1

    Do u have slides of this series?
    could u please provide it to me?please

  • @saurabhsuman9561
    @saurabhsuman9561 4 роки тому +1

    i get IIS EXPRESS(GOOGLE CHROME ) NOT GOOGLE CHROME

  • @omkarrane4788
    @omkarrane4788 3 роки тому

    Employee is not accessible after creating controller

  • @samyaktalks6596
    @samyaktalks6596 Рік тому

    Aapka aawaj bhaut kam aaraha he sir

  • @choudharyrashid9530
    @choudharyrashid9530 2 роки тому

    Hello sir,
    video time 27:41 ,
    is m id ke value show ho rahe h,
    mera visual studio m show nhi ho rahe h

  • @khanshabbir0018
    @khanshabbir0018 3 роки тому

    Sir second home work is not able to solve ..please solve it sir

  • @ashajadhav8666
    @ashajadhav8666 3 роки тому +1

    Thank you so much for simply great explanation