<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="AssociateMaster.master.cs" Inherits="EQ.AssociateMaster" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<!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 id="Head1" runat="server">
<title>Employee Quotient</title>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type" />
<link href="Styles/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script src="Scripts/jquery.alerts.js" type="text/javascript"></script>
<script src="Scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="Scripts/jquery.js" type="text/javascript"></script>
<link href="Styles/jquery.alerts.css" rel="stylesheet" type="text/css" />
<meta name="Author" content="Dharmendra Kumar Singh" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<!--[if lt IE 7]>
<link rel="stylesheet" href="iefixes.css" type="text/css" />
<![endif]-->
</head>
<script type="text/jscript">
function clock(){
var d = new Date();
var h = d.getHours();
var m = d.getMinutes();
var s = d.getSeconds();
if (parseInt(h) < 10)
h = "0" + h;
if (parseInt(m) < 10)
m = "0" + m;
if (parseInt(s) < 10)
s = "0" + s;
$('#clock').html(", " + h + "<span class='colon'>:</span>" + m + "<span class='colon'>:</span>" + s);
// $('.colon').fadeTo(1000, .2);
setTimeout(clock, 1000);
}
</script>
<body onload="clock()">
<div id="container">
<div id="header">
<div id="logo">
<div id="Div1">
<h1 style="color:White;"> New EQ <%--<a href="../Associates/Home.aspx"><img style="width: 140px; height: 80px;" src="../images/eq.jpg" alt="" /></a>--%></h1>
</div>
</div>
<form id="search" method="get" action="">
<div>
<table>
<tr>
<td><asp:Label ID="lblUser" runat="server" Text="Label" Font-Bold="true" Font-Size="16px" ForeColor="White"></asp:Label></td>
<td><span class="line-separator"> </span></td>
<td>
<asp:HyperLink ID="SignOut" runat="server" style="color:White;font-size:15px;font-family:Calibri; background-color:transparent;font-weight: bold;" NavigateUrl="~/Account/EQLogin.aspx">Sign Out</asp:HyperLink></td>
</tr>
</table>
<table>
<tr>
<td >
<asp:Label ID="lblDate" runat="server" style="font-family:Calibri;color:White;font-weight:bold;font-size:1.3em;" />
<span id="clock" style="font-family:Calibri;color:White;font-weight:bold;font-size:1.3em;"></span>
</td>
</tr>
</table>
</div>
</form>
</div>
<div id="menu" >
<ul>
<li><a href="../Associates/Home.aspx">Home</a></li>
<li><a href="../Associates/Report.aspx">Report</a></li>
<li><a href="../Associates/MyProfile.aspx">Profile</a></li>
</ul>
</div>
<asp:ContentPlaceHolder ID="cphContent" runat="server" />
</div>
<div id="footer">
<div id="footer-left"></div>
<div id="footer-right"></div>
<div id="footer-content">
<div id="footer-navigation"> </div>
<p>Copyright © DKS All rights reserved.</p>
</div>
</div>
</body>
</html>
This is the code of my master page and i want to disable all the hyperlinks of this master page from the content page .There is a scenario when we are forcing user to not leave that content page from any ways and for that reason i want to disable all the hyperlinks of this master page.
Please guide me that how i disable this. I am not using Script Manager as i had applied Script manage on every content page and till now developed so many pages so not possible to roll back and apply script manager on master page.
Sorry didn’t read your reply about doing it client side… but for server side:
You have to put a reference to the MasterPage in your page/user control markup.
Then in the code-behind, you just cast the Page.MasterPage to your MasterPage and access its properties.
Then you can:
Something along those lines, based on what I’ve seen before, C# is a bit rusty but the principal is there.