W
Will
Cannot find any mention of this, and this would have to be a fairly
common item so looking for what I am doing wrong or some suggestion on
how to stop it.
In my Page_Load I have the following, ignore mispellings, miscase,etc
Response.Write(IsPostBack);
if (!IsPostBack) {
Response.write("above");
HtmlGenericControl masterPageBodyTag =
(HtmlGenericControl)Page.Master.FindControl("MasterBody");
masterPageBodyTag .Attributes.Add("onLoad","alert('Hi');");
Response.write("below");
}
First time on the page I get my three response.writes,IsPostBack is
False, and my alert. All is good
I hit the a submit button I get the response.write(IsPostBack) of True
and for some reason my alert other two response.write are not there.
Looking at the HTML code there is the onLoad in the <body>
Some other solution to stopping this then adding an else statement and
then setting the onLoad to blank?
common item so looking for what I am doing wrong or some suggestion on
how to stop it.
In my Page_Load I have the following, ignore mispellings, miscase,etc
Response.Write(IsPostBack);
if (!IsPostBack) {
Response.write("above");
HtmlGenericControl masterPageBodyTag =
(HtmlGenericControl)Page.Master.FindControl("MasterBody");
masterPageBodyTag .Attributes.Add("onLoad","alert('Hi');");
Response.write("below");
}
First time on the page I get my three response.writes,IsPostBack is
False, and my alert. All is good
I hit the a submit button I get the response.write(IsPostBack) of True
and for some reason my alert other two response.write are not there.
Looking at the HTML code there is the onLoad in the <body>
Some other solution to stopping this then adding an else statement and
then setting the onLoad to blank?