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
Is it possible to change the index of primary key on table?
What is asp.net? How is it different from asp?
Why asp.net mvc is better than asp.net? : Asp.Net MVC
What is the asp.net control toolkit?
What is redirecting behavior?
What is role-based security in asp.net?
How is my content secured from unauthorized access?
What are the different types of events are occured when a client requests an ASP.NET page from IIS server?
Which methods validate all the controls on a page?
How does u get record no from 5 to 15 from a dataset of 100 records?
Can you explain how ASP.NET application life cycle and page life cycle events fire?
What is AutoEventWireup attribute for ?
How use Xml data in ASP.net?
What is the difference between custom controls and user controls?
Describe the events in the life cycle of a web application.