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 are the difference between function and stored procedure in .net programming language?
What is the concept of postback in asp.net?
What are merge modules?
What is work flow gen? how can it will work with .Net?
What are navigation controls? How many navigation controls are there in ASP.NET 4.0?
What is the difference between CC and BCC?
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
What are the different types of Caching techniques in ASP.NET?
What is cookies cache and session?
How can you display all validation messages in one control?
If you are using components in your application, how can you handle exceptions raised in a component?
Do session use cookies in asp net?
How to prevent client side validation from the ASP.NET validation controls?
What is the behavior of a Web browser when it receives an invalid element?
Can action method static?