Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 1st, 2007, 04:24 PM
Authorized User
 
Join Date: May 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Need Help in LoginStatus and Asp:ImageButton [Mini


I want's to use asp:Button with Images and set there UseSubmitBehavior Property to False so that they cannot behave like a submit button
[I don't want's to use asp:ImageButton as there isn't any UseSubmitBehavior property there]
Any suggestion How Can I achieve it
What I am having a problem is that
I have a Master page on which top area there is a loginStatus control
when ever I enter on a page I get logout


Code:
<body>
    <form id="form1" runat="server">
        <table align="center" width="1024" cellpadding="0" cellspacing="0">
            <tr>
                <td colspan="4">
                    <asp:Image ID="Image1" ImageUrl="~/Images/header.jpg" runat="server" /></td>
            </tr>
            <tr height="25" align="right" bgcolor="#FFFFFF">               
                 <td valign="middle" align="right" width=90%>
                    <asp:LinkButton ID="lnkBtnAddCV" runat="server" Text="Add CV" Font-Size="10" CausesValidation="false" OnClick="lnkBtnAddCV_Click" />&nbsp;&nbsp;
                    <asp:LinkButton ID="lnkBtnViewV" runat="server" Text="View CV" Font-Size="10" CausesValidation="false" OnClick="lnkBtnViewV_Click" />                    
                    </td>
                    <td width=10% align="right">
                    <asp:LoginStatus ID="lgnStatus" runat="server" LoginText="" LogoutImageUrl="~/Images/logout.jpg"
                        LogoutPageUrl="~/Default.aspx" LogoutText="Logout" LogoutAction="Redirect" OnLoggedOut="lgnStatus_LoggedOut" />&nbsp;</td>
            </tr>
        </table>
        <table align="center" width="1024" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
            <tr>
                <td>
                    <asp:ContentPlaceHolder ID="XXXContentPlaceHolder" runat="server">
                    </asp:ContentPlaceHolder>
                </td>
            </tr>
        </table>
        <table align="center" width="1024" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
            <tr>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td height="20" align="center" valign="middle" background="../images/footer.jpg"
                    class="footer">
                    &copy;2007 www.abc.com All Rights Reserved</td>
            </tr>
        </table>
    </form>
</body>
</html>
 
My Page is  have a Next button on the top suppose if i remove the loginstatus control from the master page then click on my the vent associated with the next button get fired my content page is [In this page I am adding user control at runtime]
<asp:Content ID="Content1" ContentPlaceHolderID="XXXContentPlaceHolder" runat="Server">
    <table bgcolor="#FFFFFF" width="1024" border="0" cellpadding="0" cellspacing="2"
        align="center">
        <tr>
            <td align="left" valign="top">
                <table border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"
                    class="text">
                    <tr align="center" valign="top">
                        <td>
                            <asp:Label ID="lblSaveMessage" runat="server" EnableViewState="false"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td align="right" valign="middle">                            
                            <asp:ImageButton ID="imgBtnNextUpper" ImageUrl="~/Images/button-next.jpg" runat="server"
                                OnClick="imgBtnNext_Click" />&nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td align="left" valign="top">
                            <table width="100%" border="0" cellpadding="0" cellspacing="2" runat="server" id="MainTable">
                                <tr align="left">
                                    <td width="49%" valign="top">
                                        <table width="100%" border="0" cellspacing="0" cellpadding="0" runat="server" id="LeftRow" />
                                    </td>
                                    <td width="1%" align="center" valign="top" style="border-right: 1px solid #C6C5C5;">
                                        &nbsp;</td>
                                    <td width="50%" valign="top">
                                        <table width="100%" border="0" cellspacing="0" cellpadding="0" runat="server" id="RightRow" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td align="right" valign="middle">
                            <asp:ImageButton ID="imgBtnNextLower" ImageUrl="~/Images/button-next.jpg" runat="server"
                                OnClick="imgBtnNext_Click" />&nbsp;</td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</asp:Content>
Please help me what can I do to overcome these problems
e.g in one of user control used in the page i have a fileupload control when focus is on Browse and I click I get logout.
I have done some posts but no helpful reply from the forum

http://forums.asp.net/t/1153640.aspx
http://forums.asp.net/t/1153174.aspx







Similar Threads
Thread Thread Starter Forum Replies Last Post
Uniqueness of LoginStatus controls roman BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 4 June 25th, 2008 05:01 PM
Mini dump file Baby_programmer BOOK: Professional Team Foundation Server ISBN: 0-471-91930-6 0 June 25th, 2008 03:37 PM
post back of an asp.imagebutton produce error gbianchi ASP.NET 2.0 Professional 6 July 11th, 2007 10:00 AM
asp:imagebutton link to New url nawski ASP.NET 1.0 and 1.1 Basics 12 November 5th, 2006 07:50 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.