Posts

Showing posts from 2019

Change Visual Studio Code Explorer Size

Change Visual Studio Code Explorer Size Go to FILE => Preferences => Settings =>  Find "Workbranch" under User Tab => Find "Edit in Setting.json"  {      "workbench.colorTheme" :  "Monokai" ,      "editor.fontSize" :  13 ,      "window.zoomLevel" :  1 } window.zoomlevel for solution explorer Size editor.fontsize for editor font size Change according to your need Thanks content reference link:   https://code.visualstudio.com/docs/getstarted/settings

Convert Numeric Value Into Words (Currency) In C#

+++++++++++++++++++++++++ https://code.msdn.microsoft.com/windowsdesktop/Convert-Numeric-Value-Into-db70224e +++++++++++++++++++++++++ also good article for interview or learning deep about asp.net web forms +++++++++++++++++++++++++ https://www.c-sharpcorner.com/UploadFile/1492b1/C-Sharp-and-Asp-Net-question-and-answersall-in-one/ +++++++++++++++++++++++++

What event handlers can I include in Global.asax?

What event handlers can I include in Global.asax? Application_Start, Application_End,  Application_AcquireRequestState, Application_AuthenticateRequest, Application_AuthorizeRequest, Application_BeginRequest, Application_Disposed,  Application_EndRequest,  Application_Error, Application_PostRequestHandlerExecute, Application_PreRequestHandlerExecute,  Application_PreSendRequestContent, Application_PreSendRequestHeaders,  Application_ReleaseRequestState, Application_ResolveRequestCache, Application_UpdateRequestCache, Session_Start  and Session_End.

Insert and Get value multi checkbox box list using MVC 5

Insert and Get value multi checkbox box list using MVC 5 [HTTPGET] =========================  [HttpGet]         public ActionResult UserProfile()     // Show form data page load time         {             ProfileViewModel obj = new ProfileViewModel();             string username = Convert.ToString(Session["Username"]);             SignUp objsignup = db.signUp.Where(x => x.Username == username).FirstOrDefault();  List<Hobbies> objSelectedHobbies = FillHobbies();             if (!string.IsNullOrEmpty(objsignup.Hobbies))             {                             string s = objsignup.Hobbies;                 string[] values = s.Split(','); ...

When should we use a unique key

Image
SQL UNIQUE Constraint The UNIQUE constraint ensures that all values in a column are different. Both the UNIQUE and PRIMARY KEY constraints provide a guarantee for uniqueness for a column or set of columns. A PRIMARY KEY constraint automatically has a UNIQUE constraint. However, you can have many UNIQUE constraints per table, but only one PRIMARY KEY constraint per table. ======================== Q and A Question :  Since primary key and unique is similar. I have trouble grasping the concept of the two. I know primary key doesnt accept null and unique key accepts a null once. Since a null value is a unique value so it can be only accepted once. But the idea of primary key is having a uniqueness in every row. which a unique key also do. thats why im asking when is it proper to use primary key over unique key and vice versa. Answer :  A UNIQUE constraint is similar to PRIMARY key, but you can have more than one UNIQUE constraint per table. When you declare ...

Get Top 3rd salary using MS SQL server

You can get any number of Top salary by using below query WITH CTE AS (     SELECT EmpID, EmpName, EmpSalary,            RN = ROW_NUMBER() OVER (ORDER BY EmpSalary DESC)     FROM dbo.Salary ) SELECT EmpID, EmpName, EmpSalary FROM CTE WHERE RN =  @NthRow If somebody ask for Top 3rd salary, then i'll replace 3 to  @NthRow  then i'll execute query. and then i'll get top 3rd salary.   

Change database schema name using mssql

Question : ============================================ I have this schema :  [hhh].[spemployee] and what to change schema like this :  [eee].[ spemployee ] ============================================ Answer : ============================================= First Create below  IF (NOT EXISTS (SELECT * FROM sys.schemas WHERE name = 'eee'))  BEGIN     EXEC ('CREATE SCHEMA [eee] AUTHORIZATION [dbo]') END Then user ALTER to change schema name  ALTER SCHEMA [ eee ]      TRANSFER [hhh].[ spemployee ] ============================================= ===================================================== and Result as below :  [eee].[ spemployee ] =====================================================