You ve defined one page_load event in aspx page and same
page_load event in code behind how will prog run?

Answers were Sorted based on User's Feedback



You ve defined one page_load event in aspx page and same page_load event in code behind how will pr..

Answer / js_m

The Page_load method in the aspx page will only run.It takes
precedence over the one in the code behind.

Is This Answer Correct ?    18 Yes 0 No

You ve defined one page_load event in aspx page and same page_load event in code behind how will pr..

Answer / vijaykumar

The Page_load method in the aspx page will only run.

Is This Answer Correct ?    12 Yes 1 No

You ve defined one page_load event in aspx page and same page_load event in code behind how will pr..

Answer / sudhir sheoran

Page load of aspx will be given preference

e.g:


<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default"%>

<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
Response.Write("Page");
}
</script>
<head runat="server">
<title></title>
</head>

<body>
<form id="form1" runat="server">
<div>

</div>
</form>
</body>
</html>


And in Code Behind:

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Response.Write("Behind");
}
}

SO Page will be shown as output not behind

Is This Answer Correct ?    2 Yes 0 No

You ve defined one page_load event in aspx page and same page_load event in code behind how will pr..

Answer / arun

page load of aspx will run first 

Is This Answer Correct ?    1 Yes 0 No

You ve defined one page_load event in aspx page and same page_load event in code behind how will pr..

Answer / arvind kumar

Hi frnd,

In this case, Page_Load() method of aspx.cs takes precedence
over the Page_Load() method of aspx file.

The code assosicated with Page_Load() of aspx would not run.

Is This Answer Correct ?    6 Yes 7 No

You ve defined one page_load event in aspx page and same page_load event in code behind how will pr..

Answer / 6y787y

tu

Is This Answer Correct ?    2 Yes 5 No

Post New Answer

More ASP.NET Interview Questions

Types of configuration files and their differences ?

2 Answers   Accenture,


How to unit test Web API?

0 Answers  


Explain the steps needed to be performed in order to create an animation in xaml?

0 Answers  


Tell About Web.config ?

2 Answers   Keane India Ltd,


what is Disco?what it will do?

2 Answers   Microsoft,


Explain global assembly cache.

0 Answers  


What is difference between inproc and outproc?

0 Answers  


Suppose, I have 3 pages, Page1.aspx, Page2.aspx, Page3.aspx. All pages are in diff. server. When user req. for a page, Page1.aspx opens Ist & a session established. If user req. for IIn page, second session established. Similarly, 3rd session established if user req. 3rd page. In this scenario, tot. 03 sessions are established. How we can minimize it so that it will work with only one session?

3 Answers   TCS, Wipro,


What do you mean by authentication and authorization

3 Answers  


To redirect the user to another page which method do we use without performing a round trip to the client?

0 Answers   Siebel,


Explain the Session state management options available with ASP.NET?

0 Answers   Siebel,


Which two new properties are added in asp.net 4.0 page class?

0 Answers  


Categories