How to popup a messagebox with asp.net? 
Author Message
 How to popup a messagebox with asp.net?

Hi there,

I writing a web application with asp.net. The language I choose is C#. Now I
have an OnServerClick event handler for a datagrid delete button, and I
wanna put a confirmation message before the deletion actually takes place.

Would anybody tell me how to popup a messagebox right in the event handler
with asp.net?

Thanks in advance!

Cheers,
Rick



Sun, 21 Nov 2004 21:58:51 GMT  
 How to popup a messagebox with asp.net?
http://www.dotnetjunkies.com/howto/default.aspx?id=32


Quote:
> Hi there,

> I writing a web application with asp.net. The language I choose is C#. Now
I
> have an OnServerClick event handler for a datagrid delete button, and I
> wanna put a confirmation message before the deletion actually takes place.

> Would anybody tell me how to popup a messagebox right in the event handler
> with asp.net?

> Thanks in advance!

> Cheers,
> Rick



Sun, 21 Nov 2004 22:03:39 GMT  
 How to popup a messagebox with asp.net?
Rick,

    You really can't (nor do you want to).  The code that is run in the
event handler is being executed on the server side.  If you popped up a
message box, then you would stop the thread from processing and then you
would really have a mess.

    What you want to do is have your event handler modify the result that is
returned to the client so that a call to window.alert is made on the client
side with your message.

    Hope this helps.

--
               - Nicholas Paldino [.NET MVP]


Quote:
> Hi there,

> I writing a web application with asp.net. The language I choose is C#. Now
I
> have an OnServerClick event handler for a datagrid delete button, and I
> wanna put a confirmation message before the deletion actually takes place.

> Would anybody tell me how to popup a messagebox right in the event handler
> with asp.net?

> Thanks in advance!

> Cheers,
> Rick



Sun, 21 Nov 2004 22:11:54 GMT  
 How to popup a messagebox with asp.net?
Many thanks John.

Rick


Quote:
> http://www.dotnetjunkies.com/howto/default.aspx?id=32



> > Hi there,

> > I writing a web application with asp.net. The language I choose is C#.
Now
> I
> > have an OnServerClick event handler for a datagrid delete button, and I
> > wanna put a confirmation message before the deletion actually takes
place.

> > Would anybody tell me how to popup a messagebox right in the event
handler
> > with asp.net?

> > Thanks in advance!

> > Cheers,
> > Rick



Sun, 21 Nov 2004 22:45:38 GMT  
 How to popup a messagebox with asp.net?
Hi people,

Sorry, i had found out that this methods work only for linkbutton, how about
if i am using a image button?

thanx


Quote:
> Hi there,

> I writing a web application with asp.net. The language I choose is C#. Now
I
> have an OnServerClick event handler for a datagrid delete button, and I
> wanna put a confirmation message before the deletion actually takes place.

> Would anybody tell me how to popup a messagebox right in the event handler
> with asp.net?

> Thanks in advance!

> Cheers,
> Rick



Mon, 22 Nov 2004 11:48:32 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Popup/MessageBox in ASP.NET

2. simple yes/no messagebox dialog in a Asp .net webapp

3. MessageBox in C# and ASP.NET

4. How to call VB.net and ASP.net programs in MFC?(or,asp call vc)

5. Integrated Session Management for ASP.NET and ASP 3.0

6. Asp vs Asp.Net (Field access)

7. writing C# assambly for COM+ and use it by asp/vb/asp.net

8. Accessing ASP(not ASP.Net) built-in objects with C#

9. need input ASP versus ASP.NET

10. ASP.NET application with Windows.NET RC1

11. ASP.NET (ADO.NET) connect to remote MS Access Database

12. .net server controls for access from asp.net

 

 
Powered by phpBB® Forum Software