Login Form in Visual Studio 2019 using CSharp / C# - Windows Forms App (.NET Application)

Поделиться
HTML-код
  • Опубликовано: 18 окт 2024

Комментарии • 79

  • @RaresIonescuVlogs
    @RaresIonescuVlogs 2 года назад +13

    For those who are stuck at 10:10 and can't find the path: you need to go to Database Properties, but not the one on the right side of the screen, it's the one he's clicking at 6:15 . Pause at 6:15 and look at the right side of his screen, you can see "Connection String" , just copy and paste it. Thank you vor the video btw it really helped!

    • @Headers24
      @Headers24 2 года назад

      thankss bro i was stuck here :)

    • @sparrowgaming4674
      @sparrowgaming4674 2 года назад +1

      Do we need to install any local Database like SQL Server for this to work?

  • @ValuedValue
    @ValuedValue 3 года назад +7

    10:10 You don't explain anything, by copying and changing name of the database it isn't working.

  • @thanuladulshan2467
    @thanuladulshan2467 2 года назад

    Thank you ❤

  • @jeffjoff4011
    @jeffjoff4011 4 года назад +2

    Thanks dude! you deserve a sub and a like

    • @Teacher_Ali
      @Teacher_Ali  4 года назад

      Thanks for kind words. Keeps me motivated.

  • @hakeemaismail8740
    @hakeemaismail8740 3 года назад

    Super helpful!! Thank you!

    • @Teacher_Ali
      @Teacher_Ali  3 года назад

      Much appreciated. Glad it was helpful.

  • @trolledxbeamed6718
    @trolledxbeamed6718 2 года назад

    Hey there, @Teacher_ali I need help with the txtusername part. May I get help ASAP, thank you I learned a lot of this video.

  • @rhanniecanza1132
    @rhanniecanza1132 3 года назад +1

    may i ask?
    where did you get this path " (@"Data Source=(LocalDB)/MSSQLLocalDB;AttachDBFilename=|DataDirectory|\Database1.mdf;Integrated Security=True")) "

    • @aartiprajapati5844
      @aartiprajapati5844 3 года назад +2

      Right click on your database.mdf -> go to property-> there you will find connection string. Copy whole connection string

  • @IAmADreamerish
    @IAmADreamerish 2 года назад

    is posible to use PostrgeSQL for .net application ?

  • @sparrowgaming4674
    @sparrowgaming4674 2 года назад +1

    Do we need to install any local Database like SQL Server for this to work?

    • @jieyi6341
      @jieyi6341 2 года назад

      Yes we need SQLServer LocalDB

  • @ageud2416
    @ageud2416 3 года назад

    do you know how to change the name of the application? like in taskbar it is called Form1 but in file explorer its different

  • @dananjelocruz8436
    @dananjelocruz8436 2 года назад

    System.InvalidOperationException: 'The SelectCommand property has not been initialized before calling 'Fill'.'
    PLEASE HELP!

  • @Headers24
    @Headers24 2 года назад

    I have a problem, can you help me?

  • @theboss4006
    @theboss4006 3 года назад

    Hey where did you get that " "@"Data Source=(LocalDB)..." On 10:07. I copied it and then run it. Log in was okay but the dashboard won't open and a pop up said "Exception Unhandled" plssss replyyy help me

    • @Teacher_Ali
      @Teacher_Ali  3 года назад

      This is location of your database. Your LocalDB database source. You can search your path with your DB name as well to find exaction location.

  • @august6943
    @august6943 4 года назад +2

    how do you get the user which is signed in as a string?

    • @Teacher_Ali
      @Teacher_Ali  4 года назад +2

      This is "Username" variable and should refer your connected database.

  • @eduardomarin6467
    @eduardomarin6467 2 года назад

    i coppied but dont worked, can you make a pastebin or something to copy it?

  • @eh911
    @eh911 3 года назад

    so in here at 0:45 i don't have the form (windows form) how can i find this?

  • @sparrowgaming4674
    @sparrowgaming4674 2 года назад

    An exception occurred which says 'No process is on the other end of the pipe'. Please help

  • @johnkarippery9919
    @johnkarippery9919 4 года назад +1

    is that possible when i click login it navigate to my google account?

    • @Teacher_Ali
      @Teacher_Ali  4 года назад +1

      Yes sure but you need to have knowledge of APIs and need to connect to Google API for that.

    • @ayaanansari4765
      @ayaanansari4765 3 года назад

      @@Teacher_Ali Asslam-o-Alaikum Sir Please upload the video on this Topic with complete detail and source code I'm really thankful to you. You are so Brilliant and Good Teacher for me.
      Regard By: Ayaan Ansari from PAKISTAN

  • @markfx5675
    @markfx5675 3 года назад

    How did u declare the query bro

  • @croowwz
    @croowwz 4 года назад

    When users try to log into my program, this error appears
    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

    • @Teacher_Ali
      @Teacher_Ali  4 года назад

      You need to have SQLServer LocalDB installed. Program won't run without SQL server on the local machine.

    • @croowwz
      @croowwz 4 года назад

      @@Teacher_Ali Did you mean I have to have LocalDB installed on my computer or on all of my clients' computers?

    • @Teacher_Ali
      @Teacher_Ali  4 года назад

      @@croowwz Yes anywhere you use it you need to have LocalDB installed.

    • @croowwz
      @croowwz 4 года назад

      @@Teacher_Ali I have to install it on all my clients' computers??

    • @croowwz
      @croowwz 4 года назад

      @@Teacher_Ali Will this work as a remote connection Data Source=DESKTOP-HMJHK87\\CROWZ;Initial Catalog=loginForm;Integrated Security=true

  • @tatatats23123
    @tatatats23123 2 года назад +1

    final solution? r-right adolf

  • @MagnusSocial
    @MagnusSocial 3 года назад

    I need some help.
    System.Data.SqlClient.SqlException: 'Invalid column name

  • @timemast3r
    @timemast3r 3 года назад

    Can I use this for sign up/registration?

    • @Teacher_Ali
      @Teacher_Ali  3 года назад +1

      Yes you can modify as you like with any number of fields.

    • @timemast3r
      @timemast3r 3 года назад

      @@Teacher_Ali Thank you!

  • @callumbarker3190
    @callumbarker3190 2 года назад

    Can you make a video on how to create a form which can be used to create logins. So that the username and password the user chooses gets added to the login database please

    • @Teacher_Ali
      @Teacher_Ali  2 года назад

      Sure I want to redo the whole login form, user creation form as well as main form in latest version of Visual Studio. Will try to get it uploaded asap.

  • @mattsam2749
    @mattsam2749 3 года назад

    Where I have typed string query it is saying invalid initializer member declaration and SQLConnection does not contain a definition for query

    • @mattsam2749
      @mattsam2749 3 года назад

      Please could you help

    • @mattsam2749
      @mattsam2749 3 года назад

      It is line 32 on you tutorial code

  • @bimpehkwakulawrence7289
    @bimpehkwakulawrence7289 2 года назад

    u didnt do a good job on how to generate the string so I cant seem to get it right

  • @engmuuseofficial1519
    @engmuuseofficial1519 4 года назад +1

    Tnks Teacher So How To You Give Me The Cod

  • @theboss4006
    @theboss4006 3 года назад

    My service based database not workinggg

  • @kirtiatre24
    @kirtiatre24 4 года назад

    what if i have to add background image to this form??

    • @Teacher_Ali
      @Teacher_Ali  4 года назад

      You can use "BackgroundImage" property of form object.

  • @jeffjoff4011
    @jeffjoff4011 4 года назад

    bro what keys did you press at 6:51

    • @jeffjoff4011
      @jeffjoff4011 4 года назад

      Nevermind you clicked update

  • @ISOPL2
    @ISOPL2 4 года назад

    Where do you get the code 10:10?

    • @Teacher_Ali
      @Teacher_Ali  4 года назад

      This is a data source string you have to define to exactly point to the location of database file. Note that reference path is not absolute but relative.

  • @linksblueshorts5961
    @linksblueshorts5961 3 года назад

    private bool IsValid
    Severity Code Description Project File Line Suppression State
    Error CS0548 'Login.IsValid': property or indexer must have at least one accessor
    How to fix?!

  • @plxyx
    @plxyx 3 года назад

    THE HELL I TOOK 5 HOURS AND YOU DID NOT EXPLANE THE DATABASE COPY AND PASTE

  • @HaiderAli-vi4qo
    @HaiderAli-vi4qo 4 года назад

    what did she paste 10:09 ??

    • @pedofangst
      @pedofangst 4 года назад

      NOBODY KNOW

    • @august6943
      @august6943 4 года назад +1

      yuo plet connection string, go to your dB and click properties

    • @pedofangst
      @pedofangst 4 года назад

      @@august6943 where is connection string bro help

    • @jeffjoff4011
      @jeffjoff4011 4 года назад

      @Haider Ali She got it at going to the DataBase and clicking modify connection then advanced then at the bottom the long thing of stuff

    • @slack5189
      @slack5189 3 года назад +2

      @"Data Source=(LocalDB)\MSSQLLocalDB;AttachDBFilename=|DataDirectory|\Login.mdf;Integrated Security=True" inside the brackets

  • @omkarmanjare4936
    @omkarmanjare4936 3 года назад

    What to do if I want to show the second window after login at exact same position where first form was, what to do?

    • @Teacher_Ali
      @Teacher_Ali  3 года назад

      Set position of new form exactly same as login form and just display it.

  • @MCervi42
    @MCervi42 2 года назад

    A lot of missed points

  • @kolmercm
    @kolmercm 3 года назад +2

    not a bad video but man the music is god awful!

  • @jamesbaysa7423
    @jamesbaysa7423 3 года назад

    Creepy sound

  • @Logan-ou7kb
    @Logan-ou7kb 3 года назад +1

    Make better vids

    • @Teacher_Ali
      @Teacher_Ali  3 года назад

      Thanks. Any suggestions are welcome.

  • @goxyazk751
    @goxyazk751 2 года назад

    my connection string isnt working, the part where it has the path to the file is in quotes and it ends the starting ones so the part where the path is ,is not in the quotes, tried jsut removing them but didnt work, tried leaving only the file name but didnt work , says it cant find the file, how do i fix it?

    • @Teacher_Ali
      @Teacher_Ali  2 года назад

      SqlConnection conn = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\Database1.mdf;Integrated Security=True") - Here "DataDirectory" is your current directory of project i.e. the same folder where you have your ".sln" solution file.

  • @pandiculation492
    @pandiculation492 4 года назад +1

    Error CS0161 'LoginForm2.isValid()': not all code paths return a value PLEASE HELP!

    • @Teacher_Ali
      @Teacher_Ali  4 года назад

      You have to share more info to offer a solution. However in the meanwhile have a look at this Stack-Overflow thread: stackoverflow.com/questions/33606833/cause-of-errorcs0161-not-all-code-paths-return-a-value