Messagebox in asp.net? I need another posibillity!

L

Luis Alvarado

Hello everybody,
I am new programming in asp.net, recently I have been hired in a company
and they were creating a simple application, this application is developed
in asp.net 2 visual Studio 2005 and is tested in a Windows 2003 standard.
My problem is that when I check some buttons events, they are calling a
Msgbox function, I have read that that is incorrect, but I have tried to
change it for a java Script messagebox and even though I have found some
examples (using a dll)they are not working very well. Can you help me with
this?
The programmer is not working for the company, and I can't use that
messagebox(the server returns a security error) and I don't want to (it
could handle the server).
This is an example of the code for a asp.net button I found:
Protected Sub LinkPB_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles LinkPB.Click

If MsgBox("Desea confirmar los cambios?", MsgBoxStyle.YesNo, "Confirmacion")
= MsgBoxResult.Yes Then

....

If (MsgBox("Desea continuar?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes)
Then

...

if success= true then

MsgBox("Thanks")

End if

End If

End If


Thanks!
 
L

Luis Alvarado

Thank you for the answer, now I have a doubt:
In the example you sent me, they're using a html button, callling a
javascript function, I need something working with an asp.net button, in
order to do not loose all the code has been written.
Unfurtunately many msgbox functions are been called inside the asp button.,
so how could I change this message box for something that let me keep of the
code?



Eliyahu Goldin said:
In web programming produced a message box is a client-side task.

You may find this link useful:

http://usableasp.net/DeveloperPage....o/HowToPassMessagesBetweenServerAndClient.htm

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


Luis Alvarado said:
Hello everybody,
I am new programming in asp.net, recently I have been hired in a
company and they were creating a simple application, this application is
developed in asp.net 2 visual Studio 2005 and is tested in a Windows 2003
standard.
My problem is that when I check some buttons events, they are calling a
Msgbox function, I have read that that is incorrect, but I have tried to
change it for a java Script messagebox and even though I have found some
examples (using a dll)they are not working very well. Can you help me
with this?
The programmer is not working for the company, and I can't use that
messagebox(the server returns a security error) and I don't want to (it
could handle the server).
This is an example of the code for a asp.net button I found:
Protected Sub LinkPB_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles LinkPB.Click

If MsgBox("Desea confirmar los cambios?", MsgBoxStyle.YesNo,
"Confirmacion") = MsgBoxResult.Yes Then

...

If (MsgBox("Desea continuar?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes)
Then

...

if success= true then

MsgBox("Thanks")

End if

End If

End If


Thanks!
 
E

Eliyahu Goldin

It will be the same except you will use the OnClientClick property for
setting the client script.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


Luis Alvarado said:
Thank you for the answer, now I have a doubt:
In the example you sent me, they're using a html button, callling a
javascript function, I need something working with an asp.net button, in
order to do not loose all the code has been written.
Unfurtunately many msgbox functions are been called inside the asp
button., so how could I change this message box for something that let me
keep of the code?



Eliyahu Goldin said:
In web programming produced a message box is a client-side task.

You may find this link useful:

http://usableasp.net/DeveloperPage....o/HowToPassMessagesBetweenServerAndClient.htm

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


Luis Alvarado said:
Hello everybody,
I am new programming in asp.net, recently I have been hired in a
company and they were creating a simple application, this application is
developed in asp.net 2 visual Studio 2005 and is tested in a Windows
2003 standard.
My problem is that when I check some buttons events, they are calling a
Msgbox function, I have read that that is incorrect, but I have tried to
change it for a java Script messagebox and even though I have found some
examples (using a dll)they are not working very well. Can you help me
with this?
The programmer is not working for the company, and I can't use that
messagebox(the server returns a security error) and I don't want to (it
could handle the server).
This is an example of the code for a asp.net button I found:
Protected Sub LinkPB_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles LinkPB.Click

If MsgBox("Desea confirmar los cambios?", MsgBoxStyle.YesNo,
"Confirmacion") = MsgBoxResult.Yes Then

...

If (MsgBox("Desea continuar?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes)
Then

...

if success= true then

MsgBox("Thanks")

End if

End If

End If


Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top