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
What is an example of an application service provider?
How you will manage the state of ASP.NET controls?
What is data binding in asp net?
How can we prevent browser from caching an aspx page?
Difference between application events and session events
What is http protocol and how it works?
What is the usage of DelegatingHandler?
Elaborate differentiation between Cache and Application?
Can you explain how ASP.NET application life cycle and page life cycle events fire?
Explain weak typing and strong typing.
how to write html code with ssl
Explain the use of resource manager class in .net.
What are app services?
How many types of cache are there?
What is Pre-Render event in ASP.NET?