Click here to Skip to main content
15,896,118 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello sir i am working in one software company. sir my main problem is that when i complete my project then that project host on the server so only front view of the website appear but in future when i change company i have no demonstraton to see my live project. so
i want that plz give me some trick which can i set in admin login panel (or any other location) to enter into admin panel. now a days i am do this work by this method
if(textbox1.text="abc" && textbox2.text="123")
{
response.redirect("//admin page");
} 

this is my hard code in login page but this is is not secure give me best trick which can i can i do during programming.
Posted
Updated 19-Apr-12 0:18am
v2

If you have only one admit
than use the employee id of the admin directly in the program.
like:
Let the employee id of the admin is 1.
C#
if(emp_id == 1)
{
Response.Redirect("//Admin Page.");
}
else
{
Response.Redirect("//User Page.");
}


If you want to assign more than one admin than create a new column your login details table .(column name IS_ADMIN) and set as 1 for admin and 0 for general user.
and use that one:
C#
if(IS_ADMIN == 1)
{
Responce.Redirect("//Admin Page");
}
else
{
Response.Redirect("//User Page");
}
 
Share this answer
 
Hi,

Use microsoft cryptograpy to encrypt and decrypt the page name. see the below example for encrypt and decrypt using microsoft cryptography logic.

Encryption/Decryption with .NET[^]Encryption/Decryption with .NET[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900