U
Umut Tezduyar
It seems, it is caching it.
The following code is an example for it. How can avoid from this.
override void OnLoad (sender and eventargs)
{
Control control = this.LoadControl (path);
this.Controls.Add (control);
// I change the content of the html of the control.
TextReader reader = new StreamReader (path);
string content = reader.ReadToEnd ();
reader.Close();
TextWriter writer = new StreamWriter (path);
writer.Write (content + "<b>NewPart</b>");
writer.Close ();
}
override void OnPreRender (sender and eventargs)
{
// Altough i have changed the content of the control, still same control
is loaded.
Control control = this.LoadControl (path);
this.Controls.Add (control);
}
I have not copy-paste this code from VS. There may be some implementation
mistakes. Sorry for this.
The following code is an example for it. How can avoid from this.
override void OnLoad (sender and eventargs)
{
Control control = this.LoadControl (path);
this.Controls.Add (control);
// I change the content of the html of the control.
TextReader reader = new StreamReader (path);
string content = reader.ReadToEnd ();
reader.Close();
TextWriter writer = new StreamWriter (path);
writer.Write (content + "<b>NewPart</b>");
writer.Close ();
}
override void OnPreRender (sender and eventargs)
{
// Altough i have changed the content of the control, still same control
is loaded.
Control control = this.LoadControl (path);
this.Controls.Add (control);
}
I have not copy-paste this code from VS. There may be some implementation
mistakes. Sorry for this.