You ve defined one page_load event in aspx page and same
page_load event in code behind how will prog run?
Answer Posted / 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 |
Post New Answer View All Answers
Describe a Windows Service and its lifecycle ?
What is preprocessor in .net?
Give me one example of Web API Routing?
Why select Web API?
What's the ASP.Net Application life cycle?
Explain what are the advantages of asp.net mvc framework? : asp.net mvc
Why is the standalone environment only useful during the development process?
Which authentication uses a combination of windows and iis authentication?
Which methods validate all the controls on a page?
What is an example of an application service provider?
Explain model, view and controller represent in an mvc application? : asp.net mvc
What is the difference between session and viewstate in asp.net?
What is repository pattern in mvc.net? : asp.net mvc
Difference between overriding and overloading?
What is full trust in asp.net?