Re: PLEASE HELP.... ALERT PostBack

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Alvin Bruney [MVP] (vapor)
Date: 04/22/04


Date: Thu, 22 Apr 2004 17:24:42 -0500

just go ahead and pull your hair out...it aint worth it

...now that you are bald, let's take a look. if you want the message box to
appear ontop of the page, either use registerstartupscript or replace the
response.write portion to Page.Controls.Add(new LiteralControl("<script...

use attributes to post on condition. modify this code to post

Button1.Attributes.Add("onClick", "event.returnValue=confirm('Are you sure
you wish to delete the selected rate
deck?');document.body.style.cursor='wait';document.all.WaitState.style.display
= '';");

-- 
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"walterd" <walterd@ananzi.co.za> wrote in message 
news:e92lEvJKEHA.3924@tk2msftngp13.phx.gbl...
> Hi All
>
> Can someone please help me before I pull out all my hair? All my pages
> inherit from PageBase class and I have the following code:
>
> Public Shared Function CreateMessageAlert(ByRef aspxPage As
> System.Web.UI.Page, ByVal strMessage As String, ByVal strKey As String)
>
> Dim strScript As String = "<script language=JavaScript>alert('" & 
> strMessage
> & "')</script>"
>
> If (Not aspxPage.IsStartupScriptRegistered(strKey)) Then
>
> aspxPage.RegisterStartupScript(strKey, strScript)
>
> End If
>
> End Function
>
> My problems is:
>
> 1. When I call the following function from an, say exception or
> notification, the MessageBox appears on a BLANK Page, after clicking OK, 
> the
> page where the MessageBox was invoked from is displayed. It never displays
> on the current page :({
>
> 2. If I want to display a message and upon clicking OK, redirect the page 
> to
> another, the MessageBox never appears. Page redirect will happen and no
> message will appear :((
>
> PLEASE HELP!!!!
>
>
>
> 


Relevant Pages

  • Re: Outlook Address Book and Word
    ... guess the question would be is there anyway that I can pull information from ... display via. ... Dim oApp As Outlook.Application ... Dim oItm As ContactItem ...
    (microsoft.public.word.vba.general)
  • Re: [SLE] Netgear WG511 and SuSE 9.1
    ... > I've been slaving over it all weekend and am ready to pull my hair out (if I ... you must first start dhcpcd on eth1 before iwconfig reports ... This message was sent using IMP, the Internet Messaging Program. ...
    (SuSE)
  • Re: ReQuery on a Form Question
    ... I think you are opening the form in DataEntry mode, so it only has the new record. ... You can display the previous records by resetting the DataEntry property: ... Add an extra field to indicate if the person is a judge. ... The intent is that it will pull in all the data ...
    (comp.databases.ms-access)
  • Re: ATWT - Lukes wig parted wrong
    ... A few men can pull off a toupee. ... When my bald spot got big enough, I just went for ultra-short, and I'm ... hair is ultra-short, I look vaguely military and uber, uber BUTCH. ...
    (rec.arts.tv.soaps.cbs)
  • Re: OT: Hair Removal
    ... melting a clump of hot wax, you just rub the strips together in your hand, they get warm ... and you peel them apart and press them to your leg and you pull the hair ... my genius kicks in so I get out the hair dryer and heat ... describing what must have been a peculiarly painful predicament. ...
    (alt.support.stop-smoking)