Professionallearn.com

[ Log On ]
< <
 

Free Source Code and Articles

Submitted by:jagan nath
8/19/2023 12:00:00 AM
Language: obs

jab tak hai jaan, jane jaah mein nachugi&nb

Read more...
Submitted by:sushant Gawas
11/24/2014 12:00:00 AM
Language: Programming

Clickjacking, also known as a "UI redress attack", is when an attacker uses multiple transparent or opaque layers to trick a user into clicking on a button or link on another page when they were intending to click on the the top level page. Thus, the attacker is "hijacking" clicks meant for their page and routing them to another page, most likely owned by another application, domain, or both.

Using a similar technique, keystrokes can also be hijacked. With a carefully crafted combination of stylesheets, iframes, and text boxes, a

Read more...
Submitted by:P.K
1/5/2014 12:00:00 AM
Language: Asp.net MVC


    <script language="javascript" type="text/javascript">
        var editid;
        var count = 0;
        var incld = "";
        var i = 0;
        $(document).ready(function() {


        GattableList();

       
        });

       

        function GattableList() {
            //
           

            $.get(
            "/TestTask/TaskList/",
            null,
            function(data) {
            $("#ListDiv").html(data);
            $(".btnEdit").bind("click", Edit);
            $(".chka").bind("click", checkUncchk);
            
            
        }
            );
        }
       
        function Edit() {

            if (count == 0) {

                var par = $(this).parent().parent(); //tr
                //var d = $('#tblt tr td').attr('id');
                //alert(d);
                var ed;
                var tdButtons = par.children("td:nth-child(1)");
                var tdInclude = par.children("td:nth-child(2)");
                var tdBinderType = par.children("td:nth-child(3)");
                var tdNoteType = par.children("td:nth-child(4)");
                var tdQuickNotes = par.children("td:nth-child(5)");
                // tdInclude.html("<input type='checkbox' id='incl' >");
               
                $("#tblt tr td:nth-child(1)").click(function() {
                eid = $(this).attr('id');
                    eid = eid.trim();
                    //alert(eid);
                    var tempinc = new Array();
                    tempinc = eid.split("/");
                    i = tempinc[0];
                    //alert(i);
                    incld = tempinc[1]

                    
                    tdButtons.html("<button class='btn btn-danger btn-small' Onclick='Save(" + i + ");'>Save</buton>" + "&nbsp" +
             "<button class='btn btn-danger btn-small' Onclick='Loadgrd();'>Cancel</buton>");
             
             if (incld.trim() == "True") {

             tdInclude.html('<label><input type="checkbox" id="incl"></label>');
                    $('#incl').attr("checked", "checked");
                }
                else {
                    tdInclude.html('<label><input type="checkbox" id="incl"></label>');
                               }
               
                    
                }

            );


//                //alert(eid);
//                var inc = tdInclude.html();
//                alert(inc);
//                //var dc = document.getElementById('Include').checked

//                //            var inld = $("#Include").attr("checked");
//                //            alert(inld);
//                            if (inc.trim() == "True") {
//                                
//                     &nb

Read more...
Submitted by:P.K.S
8/17/2013 12:00:00 AM
Language: Asp.net MVC

1. Can you describe ASP.NET MVC Request Life Cycle?

Ans. There are two answers for the question.

Short Answer: Following are the steps that are executed in ASP.NET MVC Request

Life Cycle.

I. Receive request, look up Route object in RouteTable collection and create

RouteData object.

II. Create RequestContext instance.

III. Create MvcHandler and pass RequestContext to handler.

IV. Identify IControllerFactory from RequestContext.

V. Create instance of class that implements ControllerBase.

VI. Call MyController.Execute method.

VII. The ControllerActionInvoker determines which action to invoke on the controller

and executes the action on the controller, which results in calling the model and

returning a view.

Detailed Answer: There are five main steps occurs in ASP.NET Request Life

Cycle.

I. Initialize Application (Route table is created)

Desc. When we request a page from a normal ASP.NET application, there is a

physical copy of page on the disk that is corresponds to each page request. In

ASP.NET MVC, there is no page on the disk that corresponds to the request.

Request is routed to the controller. The controller is responsible for generating page

that is sent back to the browser.

ASP.NET MVC has Route Table which stores mapping entries of particular URLs to

action methods of contoller. i.e. URL “http://jinaldesai.net/Articles/CSharp” maps to

the “CSharp” method of “Articles” controller.

In ASP.NET MVC application like normal ASP.NET application when application

starts first time, it calls Application_Start() application event from Global.asax. Route

table is registered(created) from Appication_Start() event.

II. Routing Mechanism (UrlRoutingModule intercepts the request)

When a request is coming to ASP.NET MVC application, the request is intercepted

by UrlRoutingModule HTTP Module. The first thing the module does is to wrap up the

current HttpContext in an HttpContextWrapper2 object. Next, the module passes the

wrapped HttpContext to the RouteTable that was setup in the previous step, which

includes includes the URL, form parameters, query string parameters, and cookies

associated with the current request.

Next, the module creates a RouteContext object that represents the current

HttpContext and RouteData. The module then instantiates a new HttpHandler based

on the RouteTable and passes the RouteContext to the new handler’s constructor(In

ASP.NET MVC case it is MvcHandler).

Last step taken by module is setting MvcHandler as the current HTTP Handler.

III. MvcHandler Executes (Instantiate and execute controller)

In normal ASP.NET application after second step, it fires set of events including

Start, BeginRequest, PostReso

Read more...
Submitted by:Archana
8/17/2013 12:00:00 AM
Language: Asp.net MVC

What is difference between jQuery's ready and holdReady?
jQuery's ready is an event which gets triggered automatically when DOM is ready while holdReady is a signal/flag to hold this triggering. holdReady was included in 1.6 version and it works only if used before the execution/triggering of ready event. Once ready event is fired, it has nothing to do. It is useful in dynamically loading scripts before the ready starts. It release ready event execution when used with a true parameter. 

What is Jquery $.ajax() method?
The Jquery ajax() method is used to perform an AJAX (asynchronous HTTP) request.

Name any four paremeter of Jquery ajax method?
url : Specifies the URL to send the request to. Default is the current page
type : Specifies the type of request. (GET or POST)
data : Specifies data to be sent to the server
cache: A Boolean value indicating whether the browser should cache the requested pages. Default is true
beforeSend(xhr): A function to run before the request is sent

When can you use jQuery?
JQuery can be used to perform
1.Call methods on specific events
2.Traverse the documents
3.For apply CSS
4.Manipulation purpose and
5.To add effects too.
6.For apply animations
7.For give atractive look (dialogbox etc)
8.For asynchronous calls ($.ajax())
 

.What is the use of noConflict() method in Jquery?

How to select combobox selecte value and text using Jquery?
Example:
var StateID = $("#StateCbx").val(); // Or you can use it $("#iStateID").val();
var StateName = $("#StateCbx option:selected").text();
alert("Selected combobox text is= " + StateName + " and value is= " + StateID);

JQuery html() method works for both HTML and XML documents?
No, It only works for HTML
Read more...

Share Your Source Code or Article

Do you have source code, articles, tutorials, web links, and books to share? You can write your own content here. You can even have your own blog.

Submit now...

Sponsor