Monday, 20 April 2015
Tuesday, 14 April 2015
Tuesday, 7 April 2015
Encryption and decryption password in asp.net c#
Encrypting the password before string to the database, it’s
more often that if there is plain string there is chances of hack your system
by Hackers. It will be tough for them to
crack it if the password is looking like weird charter symbols.
e.g. If you store the password “test1234” to database and it
will store like;
g+yC22ZOR8iB5gdYvhkZcQ==
Sharing you the simple method which is using the MD5 algorithm to encrypt the
password and any provided string. MD5CryptoServiceProvider class return
the hash as an array of 16 bytes.
Monday, 6 April 2015
Monday, 23 March 2015
MVC routing
MVC routing
MVC routing is the URL is mapped to controller and
controller is mapped to any action type.
Suppose there is the control name customer where the action
is DisplayCustomer and you are checking
in the local host than the URL will form as
http://localhost/ customer/ DisplayCustomer
Now lets see where the Routing configuration defined for MVC
project.
You can see the below folder structure for Your MVC project
and on it there is a file RouteConfig.cs
Friday, 20 March 2015
c# hashtable vs dictionary
Hashtable and Dictionary both of them are used to maintain
the key, value pair only there is some basic difference that makes us to opt,
any of this 2 based on the situations.
Differences between
Hashtable and Dictionary.
1. Declaration of Hashtable and dictionary;
Dictionary:
Dictionary<int, string> dict = new Dictionary<int, string>();
Hashtable
:
Hashtable hst = new Hashtable();
Labels:
.Net,
C#,
Dictionary,
Diffrence,
Hashtable
convert list to string c#
There are many ways you will do convert list to string c#
from google. But what you will adopt, which is good in terms of line and in
terms of complexity.
I will demonstrate three ways to convert list to string c# with “,” seperated and you will see that which one is taking less time in execution.
I will demonstrate three ways to convert list to string c# with “,” seperated and you will see that which one is taking less time in execution.
Suppose you have list of sting, that you can form like below
code; Having 1Lakhs of string records
Thursday, 5 March 2015
showing viewdata in MVC 5 on razor view
In MVC Viewdata is the way to maintain the data for passing it from Controller to View.
Just giving the below example to pass the ViewData in MVC5 on Razor View;
You have defined or pass the Viewdata from controller like below;
public class HomeController : Controller
{
//
// GET:
/Home/
public ActionResult Index()
{
return View();
}
public ActionResult MyHomeview()
{
ViewData["Datetime"] = DateTime.Now.ToString();
return View();
}
}
Subscribe to:
Posts (Atom)





