Custom Login in DotnetNuke (DNN)

Custom Login in DotnetNuke (DNN)

UserInfo _user = new UserInfo(); // Dnn Inbuilt USer CLass private void GetUser() { string userName=txtEmail.Text.Trim(); //Getting User detail from username and placing user detail in UserInfo object for further use _user = DotNetNuke.Entities.Users.UserController.GetUserByName(this.PortalId, userName); } private void AutoLogin() { GetUser(); if (txtPassword.Text != "" && _user != null) { //LoginType is default property in dnn string prfileName = _user.Profile.GetPropertyValue("LoginType"); var message = Null.NullString; var loginStatus = UserLoginStatus.LOGIN_FAILURE; var objUser = UserController.ValidateUser(PortalId, txtEmail.Text, txtPassword.Text, "DNN", "", PortalSettings.PortalName, ref loginStatus); if (objUser != null)
Use C# to get JSON data from the web url and map it to .NET Class

Use C# to get JSON data from the web url and map it to .NET Class

Use C# to get JSON data from the web url and map it to .NET Class //Call this function where u want public void GetSubscription() { string requestUrl = " Url from which u want result"; // Send the request with url HttpWebRequest request = (HttpWebRequest)WebRequest.Create(requestUrl); //Response coming HttpWebResponse responce = (HttpWebResponse)request.GetResponse(); // var resstream = responce.GetResponseStream(); Stream responseStream = responce.GetResponseStream();
Implementation of FancyBox using Jquery in Asp.net

Implementation of FancyBox using Jquery in Asp.net

Steps for FancyBox implementation in Asp.net Step 1: Add script and style to Header in Caller Design Page
Introduction to Object Oriented Programming Concepts (OOPS) in C#.net

Introduction to Object Oriented Programming Concepts (OOPS) in C#.net

What is OOP? OOP is a design philosophy. It stands for Object Oriented Programming. Object-Oriented Programming (OOP) uses a different set of programming languages than old procedural programming languages (C, Pascal, etc.). Everything inOOP is grouped as self sustainable "objects". Hence, you gain re-usability by means of four main object-oriented programming concepts. In order to clearly understand the object orientation, let’s take your “hand” as an example. The “hand” is a class. Your body has two objects of type hand, named left hand and right hand. Their main functions are controlled/ managed by a set of electrical signals sent through your shoulders (through an interface). So the shoulder is an interface which your body uses to interact with your hands. The hand is a well architected class. The hand is being re-used to create the left hand and the right hand by slightly changing the properties of it. What is an Object? An object can be considered a "thing" that can perform a set of related activities. The set of activities that the object performs defines the object's behavior. For example, the hand can grip something or a Student (object) can give the name or address.
Difference between Ref and Out Keyword in C#.net

Difference between Ref and Out Keyword in C#.net

Introduction Both the parameters passed by reference, While for the Ref Parameter you need to initialize it before passing to the function and out parameter you do not need to initialize before passing to function. you need to assign values into these parameter before returning to the function. Ref (initialize the variable) int getal = 0; Fun_RefTest(ref getal); Out (no need to initialize the variable) int getal; Fun_OutTest(out getal); The out and the ref parameters are used to return values in the same variables, that you pass an an argument of a method. These both parameters are very useful when your method needs to return more than one values.