Re: HTML not generated on client

Tech-Archive recommends: Fix windows errors by optimizing your registry



Alexey,
Perhaps something else that may be relevant. In Page_Load , the code sets
the visible properties of the ImagePrim and ImageSec to either true or
false, depending on which image is to be displayed.

protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Session["ImageUrl"] =
ConfigurationManager.AppSettings["ImageUrl"];

string f = GetExistingFile();
Session["ImageUrl"] = Session["ImageUrl"] + f;

this.ImagePrim.Visible = true;
this.ImageSec.Visible = false;

Session["flag"] = null;
Session["Updating"] = 1;

StartFileSystemWatcher();
}

if (Session["flag"] != null)
{
switch (Convert.ToInt32(Session["flag"]))
{
case 0:
this.ImagePrim.Visible = true;
this.ImageSec.Visible = false;
Session["flag"] = 1;
break;
case 1:
this.ImageSec.Visible = true;
this.ImagePrim.Visible = false;
Session["flag"] = 0;
break;
default:
break;
}
}
else
{
Session["flag"] = 1;
}

Page.DataBind();

}

"Alexey Smirnov" <alexey.smirnov@xxxxxxxxx> wrote in message
news:c800c00f-cf9c-4ada-ad93-25fb1df98fb7@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Mar 6, 9:41 pm, "Steven" <some...@xxxxxxxxxxxxx> wrote:
GetData2() is a function that returns the same string that GetData()
returns. GetData() sets a property with it's return string, GetData2()
gets
that property. It appears to be working in the codebehind; I have verified
that the strings are exactly the same. I don't want the code to execute
GetData() twice. Should not this work?


Steven, when your code of the GetData2() function does not generate
the html for ImageSec, you should check the function. If you cannot
find the error, post the code of the function here.


.



Relevant Pages

  • Re: HTML not generated on client
    ... ImageUrl2 = szUrl; ... protected string GetData2() ... return ImageUrl2; ... GetData() sets a property with it's return string, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: write read string data
    ... GetData getData1 = new GetData; ... public class GetData extends JPanel { ... and then you compare it to a String. ...
    (comp.lang.java.help)
  • Reading string from Comm port
    ... I am having trouble reading from a Com port. ... It is to sent to me GETDATA and I am to replay with either ... remainder of the string. ... fBuffer: String; ...
    (borland.public.delphi.thirdpartytools.general)