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 ?    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

Which protocol is used to call web service?

0 Answers  


What is application variable?

0 Answers  


What property must you set, and what method must you call in your code, in order to bind the data from some data source to the Repeater control?

4 Answers  


What are the types of validation in asp net?

0 Answers  


What is an assembly? Explain its parts.

0 Answers  






if i have 1000 records and i want to access 20 ata time from SQL server, what will be the query?

9 Answers   Mind Tree,


what is the generics and where used generics in your project?

3 Answers   CTC,


What are directives in asp.net?

0 Answers  


What are the 4 tenants of SOA/D.

1 Answers  


What is view state and how this can be done and was this there in asp?

11 Answers   Accenture, KDOT, Mphasis,


what is the purpose of update panel control in ajax?

2 Answers   CSC,


What are the data controls available in asp.net?

0 Answers  


Categories