| | |
Multiview and Buttons
![]() |
•
•
Join Date: Nov 2009
Posts: 9
Reputation:
Solved Threads: 0
Hi Guys. I have a problem with my code, It should work as an membership creator, and has 4 steps, 3 steps are in multiview1, and the 4th steep is to show the message, "Your Account has been successfully created" which is on multiview2. The buttons are "back", "next" and "confirm". The problem is that when 4th step appears the buttons should not appear. This needs to be used only as an simulation, doesn't need to send the forms data to anywhere.
Will appreciate your help
and the code behind is as follow
Will appreciate your help
ASP.NET Syntax (Toggle Plain Text)
<asp:MultiView ID="MultiView1" runat="server" onactiveviewchanged="MultiView1_ActiveViewChanged"> <asp:View ID="View1" runat="server"> Step 1 </asp:View> <asp:View ID="View2" runat="server"> Step 2 </asp:View> <asp:View ID="View3" runat="server"> Step 3 </asp:View> </asp:MultiView> <br /> <asp:Button ID="btnBack" runat="server" Text="< Back " OnClick="btnBack_Click" /> <asp:Button ID="btnNext" runat="server" Text="Next >" OnClick="btnNext_Click" /> <asp:Button ID="btnSend" runat="server" Text="Confirm" OnClick="btnSend_Click" /> </div> <asp:MultiView ID="MultiView2" runat="server"> <asp:View ID="View4" runat="server"> Step 4 - Your Account has been successfully created </asp:View> </asp:MultiView>
and the code behind is as follow
ASP.NET Syntax (Toggle Plain Text)
using System; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void btnBack_Click(object sender, EventArgs e) { MultiView1.ActiveViewIndex--; } protected void btnNext_Click(object sender, EventArgs e) { MultiView1.ActiveViewIndex++; } protected void btnSend_Click(object sender, EventArgs e) { MultiView2.ActiveViewIndex++; MultiView2.Visible = true; MultiView1.Visible = false; } protected override void OnPreRender(EventArgs e) { btnBack.Visible = MultiView1.ActiveViewIndex > 0; btnNext.Visible = MultiView1.ActiveViewIndex < MultiView1.Views.Count - 1; btnSend.Visible = MultiView1.ActiveViewIndex == MultiView1.Views.Count - 1; base.OnPreRender(e); MultiView2.Visible = true; } protected void MultiView1_ActiveViewChanged(object sender, EventArgs e) { } }
![]() |
Similar Threads
- Mouse buttons are messed up (USB Devices and other Peripherals)
- Strange paw print button among IE6's buttons (Web Browsers)
- How can i swap two buttons by clicking on them (Java)
- Memory buttons problem (Java)
- Clicking Buttons to Display different BITMAPS? (C++)
- Use Ctrl+Alt+Del Without Pushing All the Buttons (Windows tips 'n' tweaks)
- IE6 - dialogue boxes , check boxes and radio buttons work very slowly after hijacking (Viruses, Spyware and other Nasties)
- IE6 hijacked - spybot cleared system but start buttons donīt work (Viruses, Spyware and other Nasties)
- Canot get file buttons or menu bars to display in i.e. (Web Browsers)
Other Threads in the ASP.NET Forum
- Previous Thread: Help me to encrypt class object: Is it possible?
- Next Thread: Forms Authentication and AD and SQL
Views: 558 | Replies: 0
| Thread Tools | Search this Thread |
Tag cloud for ASP.NET
.net 2.0 3.5 ajax ajax-doc appliances asp asp.net asp.net-mvc authentication beginner blog browser button c# chat checkbox click connectionstring control crystal crystalreport database datagridview datagridviewcheckbox datalist db delete deployment development dgv download dynamic dynamically edit encryption expose external feedback fill findcontrol flash flv form forms grid gridview iframe iis iis-application impersonation index javascript knowledge-required languages list login mac maps masterpage menu mobile navigation novell offline opener picturebox problem profile redirect remember-me save search server session silverlight sql sql-server sqlexpress-attach stop-sql-injection subdomain tracking translate translate-web-pages treeview update validation vb.net video view virtualdirectory vista visual-studio visualstudio vs2008 web website windows-auth xml xsl





