How to remove menu class if submenu is empty - c#

I have binding to <UL> using repeater control.
<ul id="menu-content" class="menu-content collapse out">
<asp:Repeater ID="rptMenu" runat="server" OnItemDataBound="rptMenu_OnItemBound">
<ItemTemplate>
<li data-toggle="collapse" data-target="#li<%# ((RepeaterItem)Container).ItemIndex + 1%>" class="collapsed active"><a id="A1">
<asp:HiddenField ID="HiddenField1" runat="server" Value='<%#Eval("Id") %>' />
<%#Eval("Name")%>
<span class="arrow"></span></a>
</li>
<ul class="sub-menu collapse" id="li<%# ((RepeaterItem)Container).ItemIndex + 1%>">
<asp:Repeater ID="rptChildMenu" runat="server">
<ItemTemplate>
<li>
<a id="A2" href='<%#Eval("Name") %>' runat="server"><%#Eval("Name")%></a>
</li>
</ItemTemplate>
</asp:Repeater>
</ul>
</ItemTemplate>
</asp:Repeater>
</ul>
If there are no sub-menu item(s), arrow icon should be hidden or should not be rendered:
<span class="arrow"></span>

Related

Prevent RadCombobox close with checkbox

I have a RadComboBox with the checkboxes for Multiselction. I want to have a postback for the ItemChecked event.
The combobox also is generating a postback on closing of the dropdown which I do not want. How can I prevent this to happen.
<telerik:RadComboBox RenderMode="Lightweight" ID="RadComboBox1" runat="server" CheckBoxes="true" EnableCheckAllItemsCheckBox="true" CssClass="modaldropdown" ZIndex="99999999"
Width="600px" Label="Select book genres:" OnDataBound="RadComboBox1_DataBound" OnItemChecked="RadComboBox1_ItemChecked" AutoPostBack="true">
<ItemTemplate>
<ul>
<li>
<strong>Name: </strong>
<%# DataBinder.Eval(Container.DataItem, "Name")%>
</li>
<li>
<strong>Email: </strong>
<%# DataBinder.Eval(Container.DataItem, "Email")%>
</li>
<li>
<strong>Department: </strong>
<%# DataBinder.Eval(Container.DataItem, "DepartmentName")%>
</li>
<li>
<strong>Division: </strong>
<%# DataBinder.Eval(Container.DataItem, "DivisionName")%>
</li>
</ul>
</ItemTemplate>
c# CodeBehind
protected void RadComboBox1_ItemChecked(object sender, RadComboBoxItemEventArgs e)
{
string r = e.Item.Text;
string rw = e.Item.Value;
}

GET ALL TAGS FROM HtmlGenericControl IN C#

I wanna get all html tags in a HTML control in C#.
Here is my HTML code..
<div id="nav" runat="server" style="position: absolute;">
<ul id="navList">
<li runat="server" id="HOME">
<a id="a1" runat="server" href="#">HOME</a>
<!-- This is the sub nav -->
<ul class="listTab">
<li runat="server" id="HM1"><a id="a2" runat="server" href="#">About This Template</a></li>
<li runat="server" id="HM2"><a id="a3" runat="server" href="#">Flash</a></li>
<li runat="server" id="HM3"><a id="a4" runat="server" href="#">jQuery</a></li>
</ul>
</li>
<li runat="server" id="BLOG">
<a id="a5" runat="server" href="#">BLOG</a>
<!-- This is the sub nav -->
<ul class="listTab">
<li runat="server" id="BM1"><a id="a6" runat="server" href="#">MENU 1</a></li>
<li runat="server" id="BM2"><a id="a7" runat="server" href="#">MENU 2</a></li>
<li runat="server" id="BM3">
<a id="a8" runat="server" href="#">MENU 3</a>
<ul class="listTab">
<li runat="server" id="BM3S1"><a id="a9" runat="server" href="#">MENU 3 SUB 1</a></li>
<li runat="server" id="BM3S2"><a id="a10" runat="server" href="#">MENU 3 SUB 2</a></li>
<li runat="server" id="BM3S3"><a id="a11" runat="server" href="#">MENU 3 SUB 3</a></li>
</ul>
</li>
</ul>
</li>
<li runat="server" id="ABOUT">
<a id="a12" runat="server" href="#">About</a>
<!-- This is the sub nav -->
<ul class="listTab">
<li runat="server" id="AM1"><a id="a13" runat="server" href="#">ABOUT MENU 1</a></li>
<li runat="server" id="AM2"><a id="a14" runat="server" href="#">ABOUT MENU 2</a></li>
<li runat="server" id="AM3"><a id="a15" runat="server" href="#">ABOUT MENU 3</a></li>
</ul>
</li>
<li runat="server" id="PORTFIL"><a id="a16" runat="server" href="#">Porfolio</a></li>
<li runat="server" id="CONTACT"><a id="a17" runat="server" href="#">Contact</a></li>
</ul>
</div>
How to get a tags from above HTML code. Here is my method, it gives only "div" tags and "li" tags. What is wrong with my code. Please help..
private void LoadMenues(HtmlGenericControl subMenu)
{
foreach (HtmlGenericControl c in subMenu.Controls.OfType<HtmlGenericControl>())
{
string id = c.ID;
string x = c.TagName; // <----**
MenuModel m = new MenuModel();
m.vcMenuID = id;
MenuModel menu = objCommon.MenuLookup(m).FirstOrDefault();
if (menu == null)
{
menu = new MenuModel();
menu.vcMenuID = id;
menu.intParentMenuID = pid;
menu.bIsActiveMenu = 1;
pid = objCommon.InsertMenu(menu);
}
else
{
pid = menu.intMenuID;
}
LoadMenues(c);
}
if (pid != null)
pid = objCommon.GetMinPID(subMenu.ID);
}
There doesn't seem to be anything wrong with your code, and you are calling the function recursively.
Please note, however, that you will only get controls having the runat="server" attribute defined with this code.
The controls you would expect to get and are not getting are those that don't have it?

how use If Statement in aspx page

I have on ListView
<asp:ListView ID="MyListView" runat="server">
<LayoutTemplate>
<ul class="menu">
<li><i></i>home</li>
<li runat="server" />
<li class="myClass">
<a title="SomeTitle" href="example.com/default.aspx">
</a>
</li>
</ul>
<ascx:Menu runat="server" Visible="true" />
</LayoutTemplate>
<ItemTemplate>
<li>
<asp:HyperLink runat="server" NavigateUrl='<%# Eval("URL") %>'
Text='<%# Eval("Title") %>'/></li>
</ItemTemplate>
<SelectedItemTemplate>
<li class="active">
<asp:HyperLink runat="server" NavigateUrl='<%# Eval("URL") %>'
Text='<%# Eval("Title") %>' /></li>
</SelectedItemTemplate>
</asp:ListView>
on .cs file I have one string
protected string CurrentName = MyMethod();//that return a string or null
in aspx page I want to show in <LayoutTemplate> different structure of tags in dependecy of my CurrentName
I try like this:
<% if(this.CurrentName ==null){ %>
<ul class="menu">
<li><i></i>home</li>
<li runat="server" />
<li class="myClass">
<a title="SomeTitle" href="example.com/default.aspx">
</a>
</li>
</ul>
<ascx:Menu runat="server" Visible="true" />
<% } else { %>
<ul class="menu">
<li><i></i>home</li>
<li class="myClass">
<ascx:Menu runat="server" Visible="true" />
</li>
</ul>
<% } %>
this method not work, how use IF statements in ASPX page right?
I would implement this with two panels which have exlusive conditions on Visible attribute, so that only one of them is rendered at a single load:
<asp:Panel runat="server" Visible='<%# this.CurrentName == null %>'>
<ul class="menu">
<li><i></i>home</li>
<li runat="server" />
<li class="myClass">
<a title="SomeTitle" href="example.com/default.aspx">
</a>
</li>
</ul>
<ascx:Menu runat="server" Visible="true" />
</asp:Panel>
<asp:Panel runat="server" Visible='<%# this.CurrentName != null %>'>
<ul class="menu">
<li><i></i>home</li>
<li class="myClass">
<ascx:Menu runat="server" Visible="true" />
</li>
</ul>
</asp:Panel>

How to increase row of a repeater as text increases?

How to increase row of a repeater as text increases? I am using a repeater to display image , and image description .if image description contains more character , the text is overlapping with the other rows . how can i solve this problem?
<HeaderTemplate>
<div class="HeaderStyle">
<div class="HeaderStyle5">Edit</div>
<div class="HeaderStyle5">Delete</div>
<div class="HeaderStyle1">Image</div>
<div class="HeaderStyle2">ImageDescription</div>
</div>
<ul id="defaultList">
</HeaderTemplate>
<ItemTemplate>
<li id='item_<%# Container.ItemIndex + 1 %>' originalId='<%# DataBinder.Eval(Container.DataItem, "ImageId") %>' class="itemStyle">
<div class="itemStyle">
<div class="itemStyle4"> <asp:HyperLink ID="LinkButton2" runat="server" Text="Edit" NavigateUrl='<%#Request.Url.AbsoluteUri+"&ImageId="+ DataBinder.Eval(Container.DataItem, "ImageId") %>'></asp:HyperLink> </div>
<div class="itemStyle5">
<asp:LinkButton ID="lnkDelete" runat="server"
CommandName='<%# DataBinder.Eval(Container.DataItem, "ImageId") %>' CommandArgument='<%# DataBinder.Eval(Container.DataItem, "SortId") %>' OnClientClick="return confirm('Are you sure , you want to delete..?');" OnCommand="Calling_Delete" >Delete</asp:LinkButton> </div>
<div class="itemStyle1"><asp:Image ID="Image1" runat="server" ImageUrl='<%# DataBinder.Eval(Container.DataItem, "ImageUrl") %> ' Height="50px" Width="50px" /> </div>
<div><%# DataBinder.Eval(Container.DataItem, "ImageDesc") %> </div>
</div>
</li>
</ItemTemplate>
<FooterTemplate>
</ul>
</FooterTemplate>
Use
myRepeater.Attributes["Style"] = "OVERFLOW-Y:auto;";

I have an aspx page within a folder which gives an error when clicked on through the menu link

The problem I have is that an aspx page within a folder called Masters doesn't open when I click to it through the menu link. The error i receive is that the URL http://ATT1/masters/masters/axy.aspx, is not found. My code is:
<body onload=" $(document).ready(function ()">
<form id="Form1" runat="server">
<div class="page" id="container">
<div class="header" >
<div class="title">
My ASP.NET Application
</div>
<div class="loginDisplay">
<asp:LoginView ID="HeadLoginView" runat="server" EnableViewState="false">
<AnonymousTemplate>
[ Log In
]
</AnonymousTemplate>
<LoggedInTemplate>
Welcome <span class="bold">
<asp:LoginName ID="HeadLoginName" runat="server" />
</span>! [
<asp:LoginStatus ID="HeadLoginStatus" runat="server" LogoutAction="Redirect" LogoutText="Log Out"
LogoutPageUrl="~/" />
]
</LoggedInTemplate>
</asp:LoginView>
</div>
<div class="nav" style="background-color: #dedede; height: 25px">
<ul id="nav">
<li>Master
<ul class="nav first">
<li><a href="Masters/Employee_Details.aspx">
<asp:Image ID="Image39" runat="server" ImageUrl="~/icons/a_g.gif" />Compaines</a></li>
<li><a href="Masters/Master_setting.aspx">
<asp:Image ID="Image41" runat="server" ImageUrl="easymenu/b_i.gif" />Master Settings</a></li>
<li><a href="Masters/Mail_Setting.aspx">
<asp:Image ID="Image42" runat="server" ImageUrl="easymenu/email.png" />Mail Settings</a></li>
<li><a href="Masters/Shift_List.aspx">
<asp:Image ID="Image40" runat="server" ImageUrl="icons/device.gif" />Shift Details</a></li>
<li><a href="Masters/Shift%20Calender%20List%20.aspx">
<asp:Image ID="Image43" runat="server" ImageUrl="easymenu/oCalendar.gif" />Shift
Calenders</a></li>
<li><a href="Masters/Shift_Roster_List.aspx">
<asp:Image ID="Image44" runat="server" ImageUrl="easymenu/oCalendar.gif" />Shift
Rosters</a></li>
<li><a href="Masters/Shift_Group.aspx">
<asp:Image ID="Image45" runat="server" ImageUrl="icons/device.gif" />Shift Group</a></li>
<li><a href="Masters/Leave_Type_List.aspx">
<asp:Image ID="Image46" runat="server" ImageUrl="easymenu/b_g.gif" />Leave Types</a></li>
<li><a href="Masters/Employee_Category.aspx">
<asp:Image ID="Image47" runat="server" ImageUrl="icons/oTasks.gif" />Employees Categories</a></li>
<li><a href="">
<asp:Image ID="Image48" runat="server" ImageUrl="icons/holiday.gif" />Public Holidays</a></li>
<li><a href="">
<asp:Image ID="Image49" runat="server" ImageUrl="easymenu/b_b.gif" />Departments</a></li>
<li><a href="">
<asp:Image ID="Image50" runat="server" ImageUrl="easymenu/b_c.gif" />Departments
Shifts</a></li>
<li><a href="">
<asp:Image ID="Image51" runat="server" ImageUrl="easymenu/b_a.gif" />Employees</a></li>
<li><a href="">
<asp:Image ID="Image52" runat="server" ImageUrl="easymenu/b_h.gif" />Employees Shifts</a></li>
<li><a href="">
<asp:Image ID="Image53" runat="server" ImageUrl="easymenu/b_d.gif" />Employees Leave
Entries</a></li>
<li><a href="">
<asp:Image ID="Image54" runat="server" ImageUrl="easymenu/b_d.gif" />Employees OutDoor
Entries</a></li>
<li><a href="">
<asp:Image ID="Image55" runat="server" ImageUrl="easymenu/BackupDataBase.gif" />Attendence
Log</a></li>
<li><a href="">
<asp:Image ID="Image56" runat="server" ImageUrl="easymenu/BackupDataBase.gif" />Manage
Work Code</a>
<ul class="nav">
<li>Work Code</li>
<li>Work Code Wise Daily Report</li>
<li>Work Code Wise Summary Report</li>
</ul>
</li>
</ul>
</li>
<li>Device Management
<ul class="nav first">
<li><a href="">
<asp:Image ID="Image57" runat="server" ImageUrl="easymenu/Device.gif" />Device List</a></li>
<li><a href="">
<asp:Image ID="Image58" runat="server" ImageUrl="icons/logs.gif" />Employee Device
Logs</a></li>
<li><a href="">
<asp:Image ID="Image59" runat="server" ImageUrl="icons/device.gif" />Device Commands</a></li>
<li><a href="">
<asp:Image ID="Image60" runat="server" ImageUrl="icons/device.gif" />Device Operation
Logs</a></li>
<li><a href="">
<asp:Image ID="Image61" runat="server" ImageUrl="icons/device.gif" />Device Error
Messages</a></li>
</ul>
</li>
<li>Utilities
<ul class="nav first">
<li><a href="">
<asp:Image ID="Image62" runat="server" ImageUrl="icons/import.gif" />Import Employees
Details</a></li>
<li><a href="">
<asp:Image ID="Image63" runat="server" ImageUrl="icons/import.gif" />Import EmployeesOtherDetails</a></li>
<li><a href="">
<asp:Image ID="Image64" runat="server" ImageUrl="icons/export.gif" />Export Employees
Details</a></li>
<li><a href="">
<asp:Image ID="Image65" runat="server" ImageUrl="icons/export.gif" />Export Employees
Other Details</a></li>
<li><a href="">
<asp:Image ID="Image66" runat="server" ImageUrl="icons/export.gif" />Export Employees
Leave Details</a></li>
<li><a href="">
<asp:Image ID="Image67" runat="server" ImageUrl="icons/import.gif" />Import Employees
Leave Balance</a></li>
<li><a href="">
<asp:Image ID="Image68" runat="server" ImageUrl="icons/import.gif" />Import Log
Records</a></li>
<li><a href="">
<asp:Image ID="Image70" runat="server" ImageUrl="icons/import.gif" />Parallel Database
Export</a></li>
<li><a href="">
<asp:Image ID="Image69" runat="server" ImageUrl="icons/import.gif" />Export Attendence
Logs</a></li>
</ul>
</li>
<li>Reports
<ul class="nav first">
<li><a href="">
<asp:Image ID="Image71" runat="server" ImageUrl="easymenu/c_c.gif" />Recalculate
Attendence</a></li>
<li><a href="">
<asp:Image ID="Image72" runat="server" ImageUrl="easymenu/c_c.gif" />Daily Attendence
Report</a></li>
<li><a href="">
<asp:Image ID="Image73" runat="server" ImageUrl="easymenu/c_c.gif" />Monthly Status</a></li>
<li><a href="">
<asp:Image ID="Image74" runat="server" ImageUrl="easymenu/c_c.gif" />Yearly Summary</a></li>
<li><a href="">
<asp:Image ID="Image75" runat="server" ImageUrl="easymenu/c_c.gif" />Attendence
Sumary Report</a></li>
<li><a href="">
<asp:Image ID="Image76" runat="server" ImageUrl="easymenu/c_c.gif" />Leave Summary</a></li>
<li><a href="">
<asp:Image ID="Image77" runat="server" ImageUrl="easymenu/c_c.gif" />Employees Details</a></li>
<li><a href="">
<asp:Image ID="Image78" runat="server" ImageUrl="easymenu/c_c.gif" />Employees Shift
Scheduler</a></li>
<li><a href="">
<asp:Image ID="Image79" runat="server" ImageUrl="easymenu/c_c.gif" />Department
Summary</a></li>
<li><a href="">
<asp:Image ID="Image80" runat="server" ImageUrl="easymenu/c_c.gif" />Log Records</a></li>
<li><a href="">
<asp:Image ID="Image81" runat="server" ImageUrl="easymenu/c_c.gif" />Random Check
Report</a></li>
<li><a href="">
<asp:Image ID="Image82" runat="server" ImageUrl="easymenu/c_c.gif" />Leave Entry
Report</a></li>
<li><a href="">
<asp:Image ID="Image83" runat="server" ImageUrl="easymenu/c_c.gif" />OutDoor Entry
Report</a></li>
<li><a href="">
<asp:Image ID="Image84" runat="server" ImageUrl="easymenu/c_c.gif" />Daily Log Report
Matrix</a></li>
<li><a href="">
<asp:Image ID="Image85" runat="server" ImageUrl="easymenu/c_c.gif" />Last Day Status
Report</a></li>
<li><a href="">
<asp:Image ID="Image86" runat="server" ImageUrl="easymenu/c_c.gif" />Continuous
Abnormality</a></li>
<li><a href="">
<asp:Image ID="Image87" runat="server" ImageUrl="easymenu/c_c.gif" />Muster Roll
Report</a></li>
<li><a href="">
<asp:Image ID="Image88" runat="server" ImageUrl="easymenu/c_c.gif" />Form J Report</a></li>
<li><a href="">
<asp:Image ID="Image89" runat="server" ImageUrl="easymenu/c_c.gif" />Detailed Form
J Report</a></li>
<li><a href="">
<asp:Image ID="Image90" runat="server" ImageUrl="easymenu/c_c.gif" />Generate memo</a></li>
<li><a href="">
<asp:Image ID="Image91" runat="server" ImageUrl="easymenu/c_c.gif" />Special Reports</a>
<ul class="nav">
<li>Departments vs EmploymentType Matrix</li>
<li>Company vs EmploymentType Matrix</li>
<li>Department Graph</li>
<li>Company Graph</li>
</ul>
</li>
<li><a href="">
<asp:Image ID="Image92" runat="server" ImageUrl="easymenu/c_c.gif" />Export Logs</a>
<ul class="nav">
<li>Export Attendence Logs</li>
<li>Attendence Logs (Employee Wise)</li>
<li>Export Device Logs</li>
<li>Export Logs in Custom Format</li>
<li>Logs in Third Party Payroll Format</li>
<li>SAP P10/ P20 Export</li>
</ul>
</li>
<li><a href="">
<asp:Image ID="Image93" runat="server" ImageUrl="easymenu/c_c.gif" />Extra Reports</a>
<ul class="nav">
<li>Custom Monthly Status Report</li>
<li>Monthly Late Arrival Early Departure Report</li>
</ul>
</li>
</ul>
</li>
<li>System User</li>
<li>Database Setting</li>
<li>Change Password</li>
<li>About
<ul class="nav first">
<li>Help Manual</li>
<li>About Us</li>
<li>Extend Evaluation</li>
</ul>
</li>
<li>Logoff</li>
</ul>
</div>
<div style="background-image: url('images/title2.jpg ')">
<asp:Image ID="Image36" runat="server" ImageUrl="~/easymenu/header_divider.gif" />
<asp:Image ID="Image1" runat="server" ImageUrl="~/easymenu/a_a.gif" />
<asp:Image ID="Image2" runat="server" ImageUrl="~/easymenu/header_divider.gif" />
<asp:Image ID="Image3" runat="server" ImageUrl="~/easymenu/a_d.gif" />
<asp:Image ID="Image5" runat="server" ImageUrl="~/easymenu/header_divider.gif" />
<asp:Image ID="Image4" runat="server" ImageUrl="~/easymenu/a_e.gif" />
<asp:Image ID="Image6" runat="server" ImageUrl="~/easymenu/header_divider.gif" />
<asp:Image ID="Image7" runat="server" ImageUrl="~/easymenu/b_i.gif" />
<asp:Image ID="Image8" runat="server" ImageUrl="~/easymenu/header_divider.gif" />
<asp:Image ID="Image9" runat="server" ImageUrl="~/easymenu/a_c.gif" />
<asp:Image ID="Image10" runat="server" ImageUrl="~/easymenu/header_divider.gif" />
<asp:Image ID="Image11" runat="server" ImageUrl="~/easymenu/b_b.gif" />
<asp:Image ID="Image12" runat="server" ImageUrl="~/easymenu/header_divider.gif" />
<asp:Image ID="Image13" runat="server" ImageUrl="~/icons/holiday.gif" />
<asp:Image ID="Image15" runat="server" ImageUrl="~/icons/device.gif" />
<asp:Image ID="Image14" runat="server" ImageUrl="~/easymenu/header_divider.gif" />
<asp:Image ID="Image17" runat="server" ImageUrl="~/easymenu/oCalendar.gif" />
<asp:Image ID="Image16" runat="server" ImageUrl="~/easymenu/header_divider.gif" />
<asp:Image ID="Image19" runat="server" ImageUrl="~/icons/oTasks.gif" />
<asp:Image ID="Image18" runat="server" ImageUrl="~/easymenu/header_divider.gif" />
<asp:Image ID="Image21" runat="server" ImageUrl="~/easymenu/b_g.gif" />
<asp:Image ID="Image20" runat="server" ImageUrl="~/easymenu/header_divider.gif" />
<asp:Image ID="Image23" runat="server" ImageUrl="~/easymenu/b_c.gif" />
<asp:Image ID="Image22" runat="server" ImageUrl="~/easymenu/header_divider.gif" />
<asp:Image ID="Image25" runat="server" ImageUrl="~/easymenu/b_a.gif" />
<asp:Image ID="Image24" runat="server" ImageUrl="~/easymenu/header_divider.gif" />
<asp:Image ID="Image27" runat="server" ImageUrl="~/easymenu/b_h.gif" />
<asp:Image ID="Image26" runat="server" ImageUrl="~/easymenu/header_divider.gif" />
<asp:Image ID="Image29" runat="server" ImageUrl="~/easymenu/b_f.gif" />
<asp:Image ID="Image28" runat="server" ImageUrl="~/easymenu/header_divider.gif" />
<asp:Image ID="Image31" runat="server" ImageUrl="~/easymenu/b_f.gif" />
<asp:Image ID="Image30" runat="server" ImageUrl="~/easymenu/header_divider.gif" />
<asp:Image ID="Image33" runat="server" ImageUrl="~/icons/logs.gif" />
<asp:Image ID="Image32" runat="server" ImageUrl="~/easymenu/header_divider.gif" />
<asp:Image ID="Image35" runat="server" ImageUrl="~/easymenu/BackupDataBase.gif" />
<asp:Image ID="Image34" runat="server" ImageUrl="~/easymenu/header_divider.gif" />
<asp:Image ID="Image37" runat="server" ImageUrl="~/easymenu/a_g.gif" />
<asp:Image ID="Image38" runat="server" ImageUrl="~/easymenu/header_divider.gif" />
</div>
<%--<a class="vlightbox1" href="" title="10" id="firstImage">
<img src="images/calender.jpg" alt="10"/></a>--%>
</div>
<div class="main">
<asp:ContentPlaceHolder ID="MainContent" runat="server" />
</div>
</div>
<div class="clear">
</div>
<div id="popup_box" style="width:445px; margin-top:50px; margin-left:50px" >
<table id="" style="width:445px" cellpadding="0" cellspacing="0" align="center">
<tr>
<td style="background-color:#0099CC; height:25px">
<asp:Label ID="Label1" runat="server" Text=" Login Form"></asp:Label><a id="popupBoxClose">Close</a></td>
</tr>
<tr style="font-size: 0;">
<td>
<img src="images/login-header.gif" />
</td>
</tr>
<tr>
<td style="padding-left: 30px; padding-top: 20px;" align="left">
<table id="" cellpadding="1px" style="width:350px;" >
<tr>
<td style="width:100px;" align="right">
<b><asp:Label ID="Label2" runat="server" Text="Login Name"></asp:Label></b></td>
<td align="left">
<asp:TextBox ID="txt_LoginName" runat="server" Width="210px"></asp:TextBox></td>
</tr>
<tr>
<td align="right">
<b><asp:Label ID="Label3" runat="server" Text="Password"></asp:Label></b></td>
<td align="left">
<asp:TextBox ID="Txt_Password" runat="server" TextMode="Password" Width="210px"></asp:TextBox></td>
</tr>
<tr><td colspan="2" align="right" >
<table id="" width="100%"><tr><td>
<%-- <cc1:captchacontrol id="CaptchaControl1" runat="server" CaptchaChars="ACDEFGHJKLNPQRTUVXYZ2346789" CaptchaMinTimeout="3" ErrorMessage="" Text="Enter the code shown:"></cc1:captchacontrol>--%></td><td><asp:ValidationSummary ID="ValidationSummary2" runat="server" Visible="False" />
</td></tr></table>
</td></tr>
<tr>
<td align="right" colspan="2" >
<table>
<tr>
<td>
<asp:Label ID="lbl_InValidError" runat="server" EnableViewState="False" ForeColor="Red"></asp:Label>
</td>
<td align="right">
<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/images/login_btn.jpg" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div class="footer">
</div>
</form>
If the page that you have shown as an example is in the Masters folder, then links on it will be relative to that folder.
href="Masters/Master_setting.aspx" would give "Masters/Masters/Master_setting.aspx"
So as the V4Vendetta's comment said, remove the Masters from the relative link, or use an absolute link such as href="~/Masters/Master_setting.aspx"

Categories

Resources