Thursday, March 6, 2014

JQUERY CALENDARS

JQUERY CALENDARS

DESCRIPTION:

             Using the following scripts the jquery pop up calendars can be easily placed on a webpage.

Here I have used some of the jquery pop calendars , you can use any one of this which suits to you!

Step 1:
Add the following "img folder", "css file" and the 'javascript files" to the solution explorer in vs2008.


Step 2:  On the header section of the html or aspx page add the source path as shown in below,




Step 3: Now add the required text box field










example:





***********************************************************************

Wednesday, March 5, 2014

DISABLE RIGHT CLICK USING JAVASCRIPT

DISABLE RIGHT CLICK USING JAVASCRIPT

DESCRIPTION:

       DISABLE THE RIGHT CLICK ON A WEBPAGE CAN BE DONE USING A JAVASCRIPT HOW EVER THERE ARE MANY WAYS WHICH WE CAN ABLE TO VIEW THE SOURCE,

 HERE I AM POSTING A SIMPLE JAVASCRIPT FOR THE DISABLE OF RIGHT CLICK ON YOUR WEBPAGE, IT CAN BE USEFUL FOR THE WEB APPLICATION WHICH RUNS UNDER WINDOW APPLICATION.



THIS JAVASCRIPT CODE WILL DISABLE THE RIGHT CLICK,

THIS PAGE IS AN EXAMPLE!!!!

Monday, March 3, 2014

COOKIES

COOKIES IN .NET

DESCRIPTION:

       The cookies are the collection of text to be stored on the user or clients computers and used by the websites when ever it want to reuse them.

Normally in web application it is required to maintain the users input for any website, cookies comes handy on that scenario.
In this example I would like to tell, how we can save the background color of user's choice.

The asp page contains the simple dropdownlist which each time gets postback when selected values are changed.

Step1: On the design page









It has 3 kinds of colors, when the selected value is changes the colorselected_indexchanged method will be executed, 

Step 2: On the code behind page



Now run the application and you will see the color you have choosen at first time remain saved on the webpage for an hour eventhough the page has been loaded everytime on sele.

Example: 



It will change after the given time expires.


Saturday, March 1, 2014

Authorization Concept in .net

Authorization Concept in .net

Introduction:

            In this article we going to know about the authorization concept in .net.
Authorization is a process of allowing or denying resources to the users.

To know more about checkout the example, I have used VS2008.

Step 1: create a website and on the solution explorer check the web.config file




Step 2:(For Application)
Now change the authentication mode to Forms" to apply the authorization concept, and also add authorization in system.web section to allow or deny users.


This will be used only for creating an application and give permission to some users to use like office use.

But at the same time if I have a website and need users to see registration webpage and other web page if they logged in, then we have to use the below code

Step 3:(For webpage)
     





 Still now we have seen how to allow authenticated users, now we going to see how to allow particular users

Step 4:(To allow particular users for application)





This will allow only 'ramanand" and restrict others.

Step 5:(To allow particular users for website)
    








As of now we have seen allow or deny anonymous users, now we going to learn how to apply this authorization concept for various roles users like admin












here,
I have two folders one is Administrator folder and another one is Customer folder. Now I want give permissions like Admin role users are able to access both the folders and Customer role users are able to access only Customer folder for that we need to set the condition like this in web.config file.

In this way we can use the authorization concept in asp.net and also note that before use deny we have to use allow tag!