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

what is shared assembly?

2 Answers   Microsoft,


Types of session management in ASP.NET ?

2 Answers   Microsoft,


I have prepared A Dynamic website in asp.net with c# and using Ms Sql server 2005 as backend database.i am facing problem while uploading this site on my FTP address it is not accessing the database.please could u tell me how cn i upload Sqlserver database on the web and what would be the connection string...???? I am using Server=".";initial catalog=databasename;persist security info=false;integrated security=SSPI;...pleas help me... Thanks in Advance..

1 Answers  


If you are using components in your application, how can you handle exceptions raised in a component?

0 Answers   Accenture,


How do you do exception management?

1 Answers   Accenture,






Where does the Web page belong in the .NET Framework class hierarchy?

1 Answers   Perot Systems, Visual Soft,


How do pass data from one layer to another layer in N-tier architecture?

2 Answers  


What is the use of location tag in web.config file

2 Answers   Karur Vysya Bank KVB,


is it possible to develop gaming application using .net technology?

2 Answers  


Can we throw exception from catch Block?

9 Answers   IBM, Accenture,


Difference between .NET and previous version?

1 Answers   Microsoft,


How many web.copnfig can exists in a web application & which will be used ?

3 Answers   MMTS,






Categories