473,471 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

msgbox yes no buttons coding

maliksleo
115 New Member
hi


i used a msgbox having a yes and no button. I want to go on different pages while clicking yes and no how i cant configured out yet and need your help.

maliksleo
May 18 '09 #1
6 5331
PRR
750 Recognized Expert Contributor
Look into JavaScript confirm box and window.open
May 18 '09 #2
maliksleo
115 New Member
@DeepBlue
thanks for your solution its realy helpful but i found another solution in vb.net and its working fine for me just check it out is it fine?
Expand|Select|Wrap|Line Numbers
  1. If MsgBox("Your subscription has been expired please renew it.", MsgBoxStyle.YesNo, "Subscription Expired") = Windows.Forms.DialogResult.Yes Then
  2.                 Response.Redirect("subscription.aspx")
  3.             Else
  4.                 Response.Redirect("main.aspx")
  5.             End If
maliksleo
May 19 '09 #3
Frinavale
9,735 Recognized Expert Moderator Expert
Maliksleo your solution is mixing controls that are meant for a Desktop application into your ASP.NET code.

I would strongly advise against this because it requires your pages to make use of ActiveX objects. This restricts your users to accessing your page in Internet Explorer only and also opens your site to new security vulnerabilities that don't exist if you stick with normal Web Controls.

You should reconsider DeepBlue's suggestion.

-Frinny

@maliksleo
May 20 '09 #4
Srikanth Chippa
4 New Member
yes this is prfectly works
Expand|Select|Wrap|Line Numbers
  1. If MsgBox("Your subscription has been expired please renew it.", MsgBoxStyle.YesNo, "Subscription Expired") = Windows.Forms.DialogResult.Yes Then 
  2.                 Response.Redirect("other.aspx") 
  3.             Else 
  4.                 // do nothing
  5.             End If 
__________________
<removed advertising links>
May 20 '09 #5
Frinavale
9,735 Recognized Expert Moderator Expert
@Srikanth Chippa
Yes Srikanth this will work, but not "perfectly".
I have already stated why.
May 20 '09 #6
maliksleo
115 New Member
thanks to all for helping me
now i am going with what frinny and deepblue said.

maliksleo
May 21 '09 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Raymond H. | last post by:
Bonjour, Est-il possible d'exécuter seulement un msgbox dans l'événement clik d'une ToolBar mais sans que le bouton en question (de la ToolBar) ne s'enfonce mais reste normal sans enfoncement ?...
17
by: MLH | last post by:
Can I control what text appears on msgbox function buttons? Sure do like NOT having to build a form to show a msg and solicit a YES/NO response. MsgBox function is a great solution for that. ...
10
by: z | last post by:
I just installed Visual Studio .Net with Framework 1.1. I already had VB6 SP6 installed. I wanted to do a quick "hello world" example in VB.Net. The code is here: Private Sub...
6
by: RML | last post by:
Hi all, I have a VB.NET app which contains 1 form. The form starts a thread which does some processing based on what the user is doing on the form. My problem is, the thread can display a MsgBox...
4
by: | last post by:
I have about 20 MsgBox occurance in by program, which I use to inform the user of the progress of the program, or ask confirmation of an action, or simply to act separators to various parts of the...
5
by: | last post by:
I have a thread which is displaying a msgbox. I need to programmatically cancel the message box if the user does click on OK. I tried to abort the thread T1.abort() , but am getting an exception....
3
by: okan | last post by:
Hi friends, Is it possible that change msgbox buttons' label. For example, buttons vbYesNo or vbOKOnly but i want to show them in Turkish yes=evet no=hayır ok=tamam i mean i want to change...
2
by: perkykoala | last post by:
I apologize in advance for being REALLY detailed/verbose. It's the result of staring/tweaking code for too long. Using VB 2005: I need to design a multiple choice test (unfortunately, I can't...
2
lee123
by: lee123 | last post by:
hi there it's been awhile since i have been to this site. but was wondering if you can call on a msgbox from a different object not to show until you have completed other textboxes. for example in...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.