Example User Control for creating Tab
Add New Web User Control to Your Project
then Add some link button and set the properties and events
eg:
ascx code
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Menu.ascx.cs"
Inherits="ProjectName.UserControl.ComplaintCaptureMenu" %>
<div class="uc-menulinks-container">
<asp:LinkButton ID="lnkHome" runat="server" CssClass="uc-menulinks" OnClick="lnkHome_Click"
CausesValidation="False">Home</asp:LinkButton>
<asp:LinkButton ID="lbnServices" runat="server" Visible="true" CssClass="uc-menulinks" OnClick="lbnServices_Click"
CausesValidation="False" Text="Services Detail" ></asp:LinkButton>
<asp:LinkButton ID="lbnLog" runat="server" Visible="true" CssClass="uc-menulinks" OnClick="lbnLog_Click"
CausesValidation="False" Text="Log Details" ></asp:LinkButton>
</div>
ascx.cs
protected void lnkComplaint_Click(object sender, EventArgs e)
{
Response.Redirect("~/Home.aspx");
}
like that......
In Content page
First register the user control
eg:
<%@ Register Src="~/UserControl/Menu.ascx" TagName="mpMenu" TagPrefix="uc2" %>
then the control using innerpage
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<uc2:mpMenu runat="server" ID="mpMenu1" />
</asp:Content>
Best Regard's
Tiju Thankachan
Akiii, if this helps please login to Mark As Answer. | Alert Moderator