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 ?    17 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 ?    11 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 ?    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 / arun

page load of aspx will run first 

Is This Answer Correct ?    0 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 ?    5 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

write six HTTP request method?

4 Answers   IBM,


How can we Deploy a website?

2 Answers  


What is custom tag in web.config ?

2 Answers   Accenture,


What is the difference between and ActiveX dll and control?

2 Answers   Microsoft,


How u refer webservices?

0 Answers   Microsoft,






what is DLL Hell and how it is solved in .NET? please explain clearly??

0 Answers   TCS,


How Web Services help Us? What r the difference between Remoting and webservices

5 Answers   TCS, Tech Mahindra, Protech,


benefits of migration from asp to asp.net hi frnds, i have to give presentation to a client about how useful would be migrating their project from asp to asp.net .plz give me some points which i should incorporate in my ppt thanks

0 Answers  


difference between Trace and Debug ?

2 Answers   Accenture, HCL, Patni,


What is difference between ASP and ASP.NET ?

3 Answers   TCS,


if i have a web page, and after the postback i dont to maintain the viewstate. How can we maintain in web application?

4 Answers   CGI,


How To Generate ConnectionString By Using Notepad??

2 Answers  






Categories