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
Error : The operation couldn’t be performed because ole db provider sqlncli10 for linked server was unable to begin a distributed transaction.00000110 oledb provider for linked server returned message the partner transaction manager has disabled its support for remote/network transactions. I can able to execute the stored procedure in sql server but when i run the web page getting error like above. I did all the configuration. what is the solution?
What is custom events?
Differentiate between globalization and localization.
What are the navigation ways between pages available in ASP.NET?
How do you sign out from forms authentication?
What are server side controls?
Name the two properties are on every validation control?
What is the difference between client-side and server-side validations in ASP.NET?
what is command line compiler.what are the steps and how it is related to debugging.
What are navigation controls? How many navigation controls are there in ASP.NET 4.0?
What is the basic purpose of the required field validator? How can you use a required field validator to check that the user changes the initial value of a text box? a listbox?
Why session is used in asp.net?
Which is the parent class of the ASP.NET server control?
State differences between MVC and WebAPI
What is the basic difference between asp and asp.net?