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

Why do we use asp.net?

587


What asp.net control can embed xaml into asp.net pages?

543


What is the importance of aspnet_isapi.dll, inetinfo.exe andaspnet_wp.exe in the page loading process.

592


Differentiate between client-side and server-side validations in web pages.

559


What is form submit?

520






can any one find and tell the difference between dot net and php which one is best ? which one we get more salary? which one is stable and which one is best for freshers and also better in future and carrer ? which one we wil get more salary sir ? please send ur valuable suggestions to kiranpulsar2007@gmail.com

1483


What is clickid?

559


Using code explain Configuration Management

1410


Explain the steps to be followed to use passport authentication.

593


Explain parts of assembly?

557


What is a web farm?

600


What are sessions in asp net?

526


What is different authentication mechanisms used in ASP.NET?

589


Explain the difference between value type and reference type?

263


How can we inherit a static variable?

543