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

about view state and how validation controls will be executed on client and server

3 Answers   Wipro,


Which template must you provide, in order to display data in a Repeater control?

3 Answers   Wipro,


Various types of Page Load functions

4 Answers   Net Solution,


How to limit table cell size with long strings?

1 Answers   IBS,


We have 2 sites in which one site allows the user with out asking credentials and second one ask for credentials through a log page. What might be the configurations settings for both sites? We can use IIS and web.config files together.

1 Answers   ADITI,






Can u able to get the xml document in crystal report if yes how its possible

2 Answers  


How do you do exception management?

1 Answers   Accenture,


1.What r collections? 2.What is .pdb file? 3.Is it possible to provide access to users in master page? 4.What is dirty n Phantom Read(SQL)? 5.What r different isolation levels(SQL)? 6.How to set authentication mode in web.config file?

0 Answers   TCS,


Urgent requirement of .NET in CMMI Level3 COmpany Pune

0 Answers  


How can you assign styles to webforms?

2 Answers   Microsoft,


difference between writing connection string in web.config through connection string and appsettings

2 Answers   iSoft,


What are ASP.NET Web Forms? How is this technology different than what is available though ASP (1.0-3.0)?

1 Answers  






Categories