Click here to Skip to main content
15,907,906 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi,

how to keep logout button in web page.i want it in top left corner of the web page but i don't know how to aligh . and about css

anybody help me......

here is my web page:
C#
<pre lang="c#"><%@ Page Language="C#" AutoEventWireup="true" CodeBehind="User.aspx.cs" Inherits="Online_Billing_System.User" %>
<%@ Register Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit" tagPrefix="ajax" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head  runat="server">
    <title>User</title>
        
    <style type="text/css">
        .style1
        {
            width: 187px;
        }
    </style>
        
</head>
<body>
<form id="form1"  runat="server">
<ajax:ToolkitScriptManager ID="scriptmanager1"  runat="server">
    
</ajax:ToolkitScriptManager>
<div style=" width:69%">
<ajax:TabContainer ID="usertabContainer"  runat="server" ActiveTabIndex="0" 
         önactivetabchanged="usertabContainer_ActiveTabChanged" 
        AutoPostBack="true" >
<ajax:TabPanel ID="tbpnlbal"  runat="server" ><HeaderTemplate>View Balance</HeaderTemplate><ContentTemplate><asp:Panel ID="viewbal" runat="server" Width="498px">
 
<table align="center" id="balancetable"
            style="width: 651px"><tr><td></td><td align="right" class="style1" ></td><td align="left" colspan="2">Account Balance </td></tr><tr>
        <td class="style2"></td>
        <td align="right" class="style3" >Member ID: </td><td class="style2">
         <asp:TextBox ID="txtbalmemid" runat="server" Enabled="False"></asp:TextBox></td>
        <td class="style2">
         </td></tr><tr><td></td><td align="right" class="style1" >Card ID: </td><td>
             <asp:TextBox ID="txtbalcardid" runat="server" Enabled="False" ></asp:TextBox></td><td>
                 </td></tr><tr><td></td><td align="right" class="style1">Name: </td><td>
             <asp:TextBox ID="txtbalname" runat="server" Enabled="False"></asp:TextBox></td><td>
                 </td></tr><tr><td class="style2"></td>
            <td align="right" class="style3">Available Balance: </td><td class="style2">
<asp:TextBox ID="txtbalance" runat="server" Enabled="False"  
       ></asp:TextBox> </td></tr>     </table></asp:Panel></ContentTemplate></ajax:TabPanel>
<ajax:TabPanel ID="tbpnltxhistory"  runat="server" ><HeaderTemplate>Transaction History</HeaderTemplate><ContentTemplate><asp:Panel ID="txhistory" runat="server" Width="545px"><table align="center"><tr><td align="right" colspan="2" ></td><td>Transaction History </td></tr><tr><td align="right" colspan="2">Member ID: </td><td>
    <asp:TextBox ID="txttxmemid" runat="server"></asp:TextBox></td></tr><tr><td align="right" colspan="2">Card ID: </td><td>
        <asp:TextBox ID="txttxcardid" runat="server"></asp:TextBox></td></tr><tr><td></td><td align="right">From Date: </td><td><asp:TextBox ID="fromdate" runat="server"></asp:TextBox></td> <ajax:CalendarExtender  ID="CalendarExtender1" 
                    TargetControlID="fromdate"  runat="server" PopupButtonID="calendar" 
                    Format="yyyy-MM-dd" Enabled="True"></ajax:CalendarExtender></td></tr><tr><td></td><td align="right">To Date: </td><td><asp:TextBox ID="todate" runat="server"></asp:TextBox></td> <ajax:CalendarExtender  ID="CalendarExtender2" 
                    TargetControlID="todate"  runat="server" PopupButtonID="calendar" 
                    Format="yyyy-MM-dd" Enabled="True"></ajax:CalendarExtender></td></tr><tr><td><asp:Button 
        ID="btnhistoryok" runat="server" Text="OK" colspan="2" align="center" 
        onclick="btnhistoryok_Click" /></td><td><asp:Button ID="btnhistorycancel" 
                runat="server" Text="Clear" OnClientClick="this.form.reset();return false;" /></td></tr></table></asp:Panel></ContentTemplate></ajax:TabPanel>
<ajax:TabPanel ID="tbpnlprofile"  runat="server" ><HeaderTemplate>Profile Setting</HeaderTemplate><ContentTemplate><asp:Panel ID="profile" runat="server" Width="569px"><table align="center"><tr><td></td>
    <td align="right" class="style1" ></td><td align="center">Profile Settings </td></tr><tr><td></td>
    <td align="right" class="style1" >Member ID: </td><td>
    <asp:TextBox ID="txtsettingmemid" runat="server" Enabled="False"></asp:TextBox></td></tr><tr><td></td>
        <td align="right" class="style1" >Card ID: </td><td>
        <asp:TextBox ID="txtsettingcardid" runat="server" Enabled="False" ></asp:TextBox></td></tr><tr><td></td>
        <td align="right" class="style1">Name: </td><td>
        <asp:TextBox ID="txtsettingname" runat="server" Enabled="False"></asp:TextBox></td></tr> <tr><td></td>
        <td align="right" class="style1">Date Of Membership: </td><td>
       
<asp:TextBox ID="txtsettingdate" runat="server" Enabled="False"  
       ></asp:TextBox>   </td>
    
               <td> <ajax:CalendarExtender ID="calendar2"  runat="server" Enabled="True" 
            Format="yyyy-MM-dd" PopupButtonID="calendar" TargetControlID="txtsettingdate">
        </ajax:CalendarExtender></td></tr>
    
                <tr><td></td><td align="right" class="style1">Opening Balance: </td><td>
                    <asp:TextBox ID="txtsettingopenbal" runat="server" Enabled="False"></asp:TextBox></td></tr><tr><td></td>
        <td align="right" class="style1" >Phone No: </td><td>
            <asp:TextBox ID="txtsettingphone" runat="server"></asp:TextBox></td><td><asp:requiredfieldvalidator ID="Requiredfieldvalidator1" runat="server" errormessage="Enter Phone Number" ControlToValidate="txtsettingphone" ValidationGroup="UserSettingGroup" ForeColor="Red"></asp:requiredfieldvalidator></td></tr><tr><td></td>
    <td align="right" class="style1" >Address: </td><td align="left">
            <asp:TextBox ID="txtsettingaddress" runat="server"></asp:TextBox></td><td><asp:requiredfieldvalidator ID="Requiredfieldvalidator2" runat="server" errormessage="Enter Address" ControlToValidate="txtsettingaddress" ValidationGroup="UserSettingGroup" ForeColor="Red"></asp:requiredfieldvalidator></td></tr><tr><td></td>
    <td align="right" class="style1">Password:</td><td align="left">
            <asp:TextBox ID="txtsettingpwd" runat="server" ></asp:TextBox></td></tr><tr><td></td>
        <td align="right" class="style1">Confirm Password</td><td align="left">
        <asp:TextBox ID="txtsettingconfirmpwd" runat="server" ></asp:TextBox></td><td>
<asp:comparevalidator ID="Comparevalidator1" runat="server" errormessage=" NewPassword and Confirm Password must be matched " ValidationGroup="UserSettingGroup" ControlToCompare="txtsettingpwd" ControlToValidate="txtsettingconfirmpwd" ForeColor="Red"></asp:comparevalidator></td></tr><tr><td></td>
        <td align="right" class="style1">
            <asp:Button ID="UserSettingOK" runat="server" Text="OK" 
                ValidationGroup="UserSettingGroup" onclick="UserSettingOK_Click"/>
        </td>
        <td align="left">
            <asp:Button ID="UserSettingCancel" runat="server" Text="Clear" OnClientClick="this.form.reset();return false;" />
        </td>
    </tr></table></asp:Panel></ContentTemplate></ajax:TabPanel>
</ajax:TabContainer>
</div>
    </form>
</body>
</html>
Posted
Comments
Tejas Vaishnav 28-Jan-14 8:18am    
Use master page to your website and make all the pages to its content page. place logout button on master page so it will visible to every page of your website.
Member 10263519 28-Jan-14 23:36pm    
it's not website ,it's web application.am very new to .net, don't mine suggest me , can i use master page to the web application. how to use it .almost i was completed my task,shall i add now master page in web application.

1 solution

Use master page to your website/web application and make all the pages to its content page. design your master page, and place logout button over master page, so it will be visible to all your pages.

please refer this links for more information.

http://webproject.scottgu.com/CSharp/MasterPages/MasterPages.aspx[^]

You can add master page there is not matter weather it is website or web application, if you have completed your application/site already without using master page, even then you can add master page to your application/site, just few design changes required to your existing pages.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900