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


Please Help Members By Posting Answers For Below Questions

What are the difference between function and stored procedure in .net programming language?

453


What is the concept of postback in asp.net?

780


What are merge modules?

749


What is work flow gen? how can it will work with .Net?

2752


What are navigation controls? How many navigation controls are there in ASP.NET 4.0?

717


What is the difference between CC and BCC?

803


benefits of migration from asp to asp.net hi frnds, i have to give presentation to a client about how useful would be migrating their project from asp to asp.net .plz give me some points which i should incorporate in my ppt thanks

2026


What are the different types of Caching techniques in ASP.NET?

763


What is cookies cache and session?

710


How can you display all validation messages in one control?

742


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

2292


Do session use cookies in asp net?

703


How to prevent client side validation from the ASP.NET validation controls?

773


What is the behavior of a Web browser when it receives an invalid element?

830


Can action method static?

743