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

What are user controls?

585


What is the difference between a candidate key and primary key?

532


Why do we need url encoding?

541


How would you turn off cookies on a page of a website?

512


Explain security types in asp.net?

551






Where you store Connection string in "Web.Config" file in ASP.NET?

590


I have an excel file with data, i am importing this excel file data into Sqlserver 2005 database. while importing i am getting wrong data(ie, special characters) in one column(description column), upto some limit the data in that column is coming fine,after that data is coming like below. The "Walter" leather storage bench is one of our most popular styles. The top with the tufting and double stitching finish a very impressive piece. The size is perfect in front of beds and the storage adds another functional bonus. Open it up and sneak al���Ƴ�Â��ƴ�Ã��ƶ�Å�� al���Ƴ�Â��ƴ�Ã��ƶ�Å�� Is there anywhy to resolve this? (I am using recordset in coding for developing import process.) please help me soon.

1444


What is inproc mode in session?

521


Is data edited in the Repeater control?

600


What are server activated objects?

653


What types of data validation events are commonly seen in the client-side form validation?

575


Explain the difference between server.transfer and response.redirect? Why would I choose one over the other?

556


How you will improve web application performance?

568


Contrast oop and soa. What are tenets of each16. How does the xmlserializer work? What acl permissions does a process using it require?

529


How do http sessions work?

513