Re: HTML not generated on client

Tech-Archive recommends: Speed Up your PC by fixing your registry



protected string GetData()
{
try
{
Session["LastImage"] = Session["SaveImage"];
LastImage = Session["LastImage"].ToString();

string url = Session["ImageUrl"].ToString();
Session["SaveImage"] = Session["ImageUrl"];
string szUrl = url.Replace("~", @"http://"; +
Request.ServerVariables["HTTP_HOST"]);
ImageUrl2 = szUrl;
return szUrl;
}
catch (Exception e)
{
RecordError(e, EventLogEntryType.Error);
return null;
}
finally
{
//Delete the previous images
Thread t = new Thread(new ThreadStart(DeleteLastFile));
t.Start();
}
}

protected string GetData2()
{
return ImageUrl2;
}

private static string _ImageUrl2;
public static string ImageUrl2
{
get { return _ImageUrl2; }
set { _ImageUrl2 = value; }
}

FWIW, I have verified that the returns are correct by setting breakpoints.

"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
    ... In Page_Load, the code sets ... GetData() sets a property with it's return string, ... the html for ImageSec, ...
    (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)