I haven't been able to use your suggestion because I can't get past some
problems.
I save a cookie with either of the ways shown below and then after a
window.location = "Home/Home.aspx";
takes me to a new window I check with
If Request.Cookies("HideSomeParts").Value Then
Do you see anything wrong with that?
Thanks
// 1 yr from now
var expdate = new Date ();
expdate.setTime (expdate.getTime() + (24 * 60 * 60 * 1000*365));
document.cookie = 'HideSomeParts=True; expires='+expdate.toGMTString();
OR
Public Sub SaveCookie(ByVal CookieName As String, ByVal CookieValue As
String)
Dim current As HttpContext = HttpContext.Current
Dim tmpCookie As HttpCookie = New HttpCookie(CookieName)
tmpCookie.Value = CookieValue
tmpCookie.Expires = DateTime.Now.AddYears(1)
current.Response.Cookies.Add(tmpCookie)
End Sub
"Scott M." <s-(E-Mail Removed)> wrote in message news:%
(E-Mail Removed)...
> This is more of a JavaScript question than an ASP .NET one but, after
> confirming that the user wants the image displayed, you can dynamically
> create a client-side image object and then load it into an existing image
> tag:
>
> var img = New Image();
> img.src = "path";
> var theImage = document.getElementById("existingImgTagName");
> theImage.src = img.src;
>
> -Scott
>
>
>
>
> " Cal Who" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>I want an aspx page to first call a sub that uses confirm() to ask the
>>user if he want an image displayed.
>>
>> Something like I show below.
>>
>> I could have check() simply use window.location to go to the next page if
>> the user refuses and to return if he says to display the image.
>>
>> However, even if he refuses the image has already been down loaded which
>> is should not happen if the user says "no"..
>>
>> How would you do this?
>>
>>
>>
>> Thanks
>>
>>
>>
>>
>>
>> <asp:Content runat="server" ID="Content4"
>> ContentPlaceHolderID="BottomCPH">
>>
>> <<script type="text/javascript">check()</script>
>>
>> <img style='border: 0px; width...
>>
>> </asp:Content>
>>
>>
>
>