You ve defined one page_load event in aspx page and same
page_load event in code behind how will prog run?
Answers were Sorted based on User's Feedback
Answer / js_m
The Page_load method in the aspx page will only run.It takes
precedence over the one in the code behind.
Is This Answer Correct ? | 18 Yes | 0 No |
Answer / vijaykumar
The Page_load method in the aspx page will only run.
Is This Answer Correct ? | 12 Yes | 1 No |
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 |
Answer / arvind kumar
Hi frnd,
In this case, Page_Load() method of aspx.cs takes precedence
over the Page_Load() method of aspx file.
The code assosicated with Page_Load() of aspx would not run.
Is This Answer Correct ? | 6 Yes | 7 No |
What the use of Form Authentication and windows Authentication?
What are the disadvantages of view state / what are the benefits?
Finally and dispose methods?
in which protocol ASP.NET WEB API Work?
what is view state?
What is binding in web service ?
suppose i am Admin in my application and i have to terminate the session of the particular user in my application.........how can i do it....?????
What is an axd file?
How many types of session in ASP.NET
What methods are fired during the page load? Init()
What are Session states available and its Uses?
Elaborate differentiation between Cache and Application?