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 asp.net web application?
What websites use asp.net?
Describe SOA and the tenets of it?
What is data binding in asp net?
what are the ihttphandler and ihttphandlerfactory interfaces ?
What is the difference between cache and cookies?
Explain what is the procedure to create the environment for asp.net? : asp.net mvc
What threading model used in asp and asp.net?
Explain the server control events of asp.net ?
How can we communicate with each server in N-tier Architecture? and what are the methods?
Can asp.net work on an nt server?
Please brief not about xsd,xslt & xml?
Explain the difference between webfarm and webgardens in .net?
Can the validation occurs in server-side or client-side? If the validation occurs why should we do?
How to bind all the binding controls in a page at once in ASP.NET?