473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

ASP.NET 2.0 Wizard Control

Is there anyway to get a javascript confirm button on the wizard control so
that when a user clicks "cancel" it can prompt something like... "Are you
sure you want to cancel? Your changes will not be saved."
Nov 19 '05 #1
2 4328
Hi Nt32msngns,

Welcome to ASPNET newsgroup.
From your description, you'd like to add a certain submit button inside the
ASP.NET 2.0's Wizard control , when user click it , it will popup a confirm
dialog to ask user whether to continue the processing(post back) ,yes?

As for this question, I have some thing confused that where do you want the
button be placed inside the Wizard control,?Currently for the ASP.NET 2.0's
Wizard control, it has provided Wizard Steps , and HeaderTemplate,
SideBarTemplate....., we can put that button in a certain Step's template
or in the wizard's other global template. Anyway, no matter where do we put
this button, we can use button's OnInit event to register the clientside
jscript code for it, for example, suppose we put the button in the Wizard
control's HeaderTemplate:

<asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="0">
<HeaderTemplate>
<asp:Button ID="btnHeader" runat="server" Text="Header Button"
OnInit="Wizard1Header_Init" />
</HeaderTemplate>
.......................
the "Wizard1Header_Init" function is defined in the page's c ode behind
like:

protected void Wizard1Header_Init(object sender, EventArgs e)
{
Button btnHeader = sender as Button;
if (btnHeader != null)
{
btnHeader.Attributes["onclick"] = @"
if(!confirm('Are you sure to continue?')){return false;}
";
}
}
And you can also register a Click event handler for this button so that
when the user confirm to postback, you can do your serverside operations in
the click evenet handler.

Hope helps. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| Thread-Topic: ASP.NET 2.0 Wizard Control
| thread-index: AcXEmV6ZwQiF/i/4S8Wp9oDmqESmfQ==
| X-WBNR-Posting-Host: 12.203.208.14
| From: "=?Utf-8?B?Tmljaw==?=" <nt********@online.nospam>
| Subject: ASP.NET 2.0 Wizard Control
| Date: Wed, 28 Sep 2005 18:59:04 -0700
| Lines: 3
| Message-ID: <21**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:127848
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Is there anyway to get a javascript confirm button on the wizard control
so
| that when a user clicks "cancel" it can prompt something like... "Are
you
| sure you want to cancel? Your changes will not be saved."
|

Nov 19 '05 #2
Hi Nt32msngns,

How are you going on this issue, does the suggestions in my last reply
helps a little?
If there're anything else we can help, please feel free to post here.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| X-Tomcat-ID: 125097590
| References: <21**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: st*****@online.microsoft.com (Steven Cheng[MSFT])
| Organization: Microsoft
| Date: Thu, 29 Sep 2005 07:55:08 GMT
| Subject: RE: ASP.NET 2.0 Wizard Control
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| Message-ID: <Gd*************@TK2MSFTNGXA01.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Lines: 76
| Path: TK2MSFTNGXA01.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:127892
| NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
|
| Hi Nt32msngns,
|
| Welcome to ASPNET newsgroup.
| From your description, you'd like to add a certain submit button inside
the
| ASP.NET 2.0's Wizard control , when user click it , it will popup a
confirm
| dialog to ask user whether to continue the processing(post back) ,yes?
|
| As for this question, I have some thing confused that where do you want
the
| button be placed inside the Wizard control,?Currently for the ASP.NET
2.0's
| Wizard control, it has provided Wizard Steps , and HeaderTemplate,
| SideBarTemplate....., we can put that button in a certain Step's template
| or in the wizard's other global template. Anyway, no matter where do we
put
| this button, we can use button's OnInit event to register the clientside
| jscript code for it, for example, suppose we put the button in the Wizard
| control's HeaderTemplate:
|
| <asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="0">
| <HeaderTemplate>
| <asp:Button ID="btnHeader" runat="server" Text="Header
Button"
| OnInit="Wizard1Header_Init" />
| </HeaderTemplate>
| ......................
|
|
| the "Wizard1Header_Init" function is defined in the page's c ode behind
| like:
|
| protected void Wizard1Header_Init(object sender, EventArgs e)
| {
| Button btnHeader = sender as Button;
| if (btnHeader != null)
| {
| btnHeader.Attributes["onclick"] = @"
| if(!confirm('Are you sure to continue?')){return false;}
| ";
| }
| }
|
|
| And you can also register a Click event handler for this button so that
| when the user confirm to postback, you can do your serverside operations
in
| the click evenet handler.
|
| Hope helps. Thanks,
|
| Steven Cheng
| Microsoft Online Support
|
| Get Secure! www.microsoft.com/security
| (This posting is provided "AS IS", with no warranties, and confers no
| rights.)
|
|
|
|
|
|
| --------------------
| | Thread-Topic: ASP.NET 2.0 Wizard Control
| | thread-index: AcXEmV6ZwQiF/i/4S8Wp9oDmqESmfQ==
| | X-WBNR-Posting-Host: 12.203.208.14
| | From: "=?Utf-8?B?Tmljaw==?=" <nt********@online.nospam>
| | Subject: ASP.NET 2.0 Wizard Control
| | Date: Wed, 28 Sep 2005 18:59:04 -0700
| | Lines: 3
| | Message-ID: <21**********************************@microsoft.co m>
| | MIME-Version: 1.0
| | Content-Type: text/plain;
| | charset="Utf-8"
| | Content-Transfer-Encoding: 7bit
| | X-Newsreader: Microsoft CDO for Windows 2000
| | Content-Class: urn:content-classes:message
| | Importance: normal
| | Priority: normal
| | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| | Newsgroups: microsoft.public.dotnet.framework.aspnet
| | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| | Xref: TK2MSFTNGXA01.phx.gbl
| microsoft.public.dotnet.framework.aspnet:127848
| | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| |
| | Is there anyway to get a javascript confirm button on the wizard
control
| so
| | that when a user clicks "cancel" it can prompt something like... "Are
| you
| | sure you want to cancel? Your changes will not be saved."
| |
|
|

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: John Bowman | last post by:
Hi, I have a C# app that needs to launch the "Add Scheduled Tasks" wizard found in the control panel "Scheduled Tasks" applet. I realize that this "applet" really just opens the tasks folder,...
2
by: John R. Lewis | last post by:
I posted this yesterday with a different email address. I am reposting with my fake-address as given to me by Microsoft so that I can be guraranteed a response from a support representative. Sorry...
6
by: Douglas J. Badin | last post by:
Earlier this month, there was a posting about this without a definitive answer. If you place a Wizard inside a FormView's EditItemTemplate the bound fields contained within the View will display...
3
by: chrisn | last post by:
Hi, (Using ASP.Net 2.0) I have a wizard control inside a detailsview control. When I attempt to call the InsertItem method on the DetailsView I get an error "ObjectDataSource...
4
by: Dabbler | last post by:
I have a Wizard control with each step using a user control. It seems the page_load of each user control is called everytime a postback event occurs in any step. Is there away to communicate to a...
12
by: raghav | last post by:
Hi I am working on ASP.NET 2.0. I am developing a website using Wizard control. Based on number of steps added, next, previous, finish buttons generate automatically. After running the...
2
by: BJ | last post by:
I had this crazy idea. We have an existing application that could use some rework. I was going to redo the application (currently ASP.Net 1.1) using ASP.Net 2.0: Master page with Header,...
2
by: Extremest | last post by:
I am wanting to make a program that will have a previous and next button at the bottom. As the user fills out stuff or clicks other buttons to have other code fill in stuff they will slowly...
8
by: GaryDean | last post by:
I have a Wizard page and need to affect the next and previous buttons from my code-behind. I've googled around and found two solutions, and neither appear to work. I can access the SideBarList...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.