I am confused if we can apply css to divs that are inside the DataList.I have a stylesheet and a aspx page that is inheriting a master page.The master page has a contentplaceholder.And the content placeholder is where i have defined my DataList.Now i have many divs inside the datalist that needs styling.How do i give them style form stylesheet NOT from the aspx page itself like <div style=" height:200px " >.It works but i need to define the css in the stylesheet not in the aspx.
Here my datalist
<asp:Content ID="Content1" ContentPlaceHolderID="ccont" Runat="Server">
<div id="ccont">
<asp:DataList ID="mydatalist" ItemStyle-CssClass="lft_c_down" runat="server">
<ItemTemplate>
<div id="lft_c">
<div id="lft_c_top">
<asp:Image runat="server" ImageUrl='<%#DataBinder.Eval(Container.DataItem,"ipath")%>' Height="250px" Width="300px" />
<br/>
</div>
<div class="lft_c_down">
<b>Product Name:</b>
<asp:Label ID="lbl2" Text='<%#DataBinder.Eval(Container.DataItem,"products") %>' runat="server" />
<br/>
<b>brand:</b>
<asp:Label ID="lbl1" Text='<%#DataBinder.Eval(Container.DataItem,"brand") %>' runat="server" />
<br/>
<b>Price:</b>
<asp:Label ID="Label1" Text='<%#DataBinder.Eval(Container.DataItem,"price") %>' runat="server" />
</div>
</div>
</ItemTemplate>
</asp:DataList>
</div>
As you can see i have a div at the starting of the contentplaceholder whose id is ccont and i can apply css there from stylesheet.Its not working for the divs inside the datalist.
EDIT
Here's my css
#lft_c_down
{
background-color:Aqua;
color:Red;
}
DataList's Default rendered html is Table. That is why your css is not working. If you dont want table style, Try Repeater this css will work.
Please try this.
Place a ContentPlaceHolder in the Head section of your Masterpage like this;
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ContentPlaceHolder ID="ccont" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>
Then, in the Webform, put the link to the external CSS file in head sections placeholder like this;
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<link href="24857957.css" rel="stylesheet" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ccont" runat="server">
<div id="ccont">
<asp:DataList ID="mydatalist" ItemStyle-CssClass="lft_c_down" runat="server">
<ItemTemplate>
<div id="lft_c">
<div id="lft_c_top">
<asp:Image runat="server" ImageUrl='http://placehold.it/140x140' Height="140px" Width="140px" />
<br/>
</div>
<div class="lft_c_down">
<b>Product Name:</b>
<asp:Label ID="lbl2" Text='<%#DataBinder.Eval(Container.DataItem,"product") %>' runat="server" />
<br/>
<b>brand:</b>
<asp:Label ID="lbl1" Text='<%#DataBinder.Eval(Container.DataItem,"brand") %>' runat="server" />
<br/>
<b>Price:</b>
<asp:Label ID="Label1" Text='<%#DataBinder.Eval(Container.DataItem,"price") %>' runat="server" />
</div>
</div>
</ItemTemplate>
</asp:DataList>
</div>
</asp:Content>
Related
I saw several post similar to mine but couldn't find a solution that fits my issue (the masterpage issue :) ).
I have a masterpage with side menu , that I created with a list (ul > li).
Whenever I select a li which refers to nowhere("ftq" for example) - the function works great and changes the css setting as I want.
But, whenever I select a li which refer to a "real" page ("updateinspec.aspx" for example) and there's a postback, all the CSS is gone .
here's the code - any help will be great
<%# Master Language="VB" AutoEventWireup="false" CodeBehind="MasterVC.master.vb" Inherits="HangarApp.MasterVC" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link href="MasterCSS.css" type="text/css" rel="stylesheet" />
<script type="text/javascript">
function myFunction(x) {
x.classList.toggle("change");
}
var lst;
function cngclass(obj) {
if (lst) lst.className = '';
obj.className = 'listactive';
lst = obj;
}
</script>
<asp:ContentPlaceHolder ID="headtitlePH" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<div id="topcontent">
<div class="menudiv" onclick="myFunction(this)">
<div class="bar1"></div>
<div class="bar2"></div>
<div class="bar3"></div>
</div>
<div class="divtitle">
<img src="../images/logo1.png" />
<asp:Label runat="server" ID="userlbl" style="padding:12%;"></asp:Label>
</div>
</div>
<div id="subtopdiv">
<div id="sub_inspec">
<br />
<asp:Label ID="stationname" runat="server" CssClass="subtopdiv"></asp:Label>
<asp:Label ID="stationcode" runat="server" Visible="false" ></asp:Label>
<asp:Label ID="linecode" runat="server" Visible="false"></asp:Label>
<asp:Label ID="typecode" runat="server" Visible="false"></asp:Label>
<asp:Label ID="lblinspecnum" runat="server" Visible="false"></asp:Label>
</div>
</div>
<div id="maincontent">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
</telerik:RadAjaxManager>
<h1></h1>
<div class="innerdiv" id="divlefttop">
<asp:ContentPlaceHolder ID="divlefttopPH" runat="server">
</asp:ContentPlaceHolder>
</div>
<div class="innerdivdtop" id="divrighttop" runat="server">
<asp:ContentPlaceHolder ID="divrighttopPH" runat="server">
</asp:ContentPlaceHolder>
</div>
<div class="innerdivld" id="divleftdown" runat="server">
<asp:ContentPlaceHolder ID="divleftdownPH" runat="server" >
</asp:ContentPlaceHolder>
</div>
<div class="innerdivd" id="divrightdown">
<asp:ContentPlaceHolder ID="divrightdownPH" runat="server">
</asp:ContentPlaceHolder>
</div>
</div>
<div id="leftcontent">
<div id="menuinsp" runat="server">
<ul>
<li><a onclick="cngclass(this);" class="active" href="Inspec_Main.aspx">Inspection APP</a></li>
<li><a onclick="cngclass(this);" class="nactive" href="#ftqpage">FTQ</a></li>
<li><a onclick="cngclass(this);" class="nactive" href="#managepage">MANAGE</a></li>
<li><a onclick="cngclass(this);" class="nactive" href="UpdateInspec.aspx">UPDATE</a></li>
<li><a onclick="cngclass(this);" class="nactive" href="#about">ABOUT</a></li>
</ul>
</div>
</div>
<div id="footercontent">
<label>LAHAV IT SYSTEM - DANA B COHEN - TEL:58840</label>
</div>
<asp:ContentPlaceHolder ID="footertitlePH" runat="server">
</asp:ContentPlaceHolder>
</form>
</body>
</html>
I think your master page isn't in the same directory as the aspx pages and you didn't use correct href in below link:
<link href="MasterCSS.css" type="text/css" rel="stylesheet" />
You need use server side link like this.
Modify your Mastercss.css link as given below and let us know if problem still exist.
<link href="/MasterCSS.css" type="text/css" rel="stylesheet" />
Here is the markup that I have:
<%# Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="AddSale.aspx.vb" Inherits="Default2" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<h2>
Add New Sale
</h2>
<p>
Please use the buttons and controls below to add a new sale for this lot to the dealership's database.
</p>
<div style="height: 180px; width: 300px">
<asp:Label ID="Label1" runat="server" style="margin:0 auto; display:inline-block" Text="Salesperson:"></asp:Label>
<asp:TextBox ID="TextBox1" runat="server" style="float:right; margin:0 auto; display:inline-block"></asp:TextBox>
<br />
<br />
<asp:Label ID="Label2" runat="server" style="margin:0 auto; display:inline-block" Text="VIN:"></asp:Label>
<asp:TextBox ID="TextBox2" runat="server" style="float:right; margin:0 auto; display:inline-block"></asp:TextBox>
<br />
<br />
<asp:Label ID="Label3" runat="server" style="margin:0 auto; display:inline-block" Text="Sale Price:"></asp:Label>
<asp:TextBox ID="test" runat="server" style="float:right; margin:0 auto; display:inline-block"></asp:TextBox>
<br />
<br />
<asp:Label ID="Label4" runat="server" style="display:inline-block" Text="MSRP:"></asp:Label>
<asp:TextBox ID="TextBox3" runat="server" style="float:right; display:inline-block;"></asp:TextBox>
<br />
<br />
<asp:Label ID="Label5" runat="server" style=" display:inline-block;" Text="Commission Rate:"></asp:Label>
<asp:TextBox ID="TextBox4" runat="server" style="float:right; display:inline-block;"></asp:TextBox>
<br />
<br />
</div>
<p>
<asp:Button ID="btntest" runat="server" Text="Add Record"/>
</p>
</asp:Content>
I can't seem to figure out how I would add a <script> tag in the markup, everything I try gives me an error.
I want to add a script that includes a function that will reject empty or badly-written boxes using regex. I notice that I don't have <html> or <head> or <body> tags on my code. Will I use those? Are those necessary at all? Where would I add it on here? By the way, this is not the master page.
If you only need the javascript function on this page, try adding the script tag inside of your HeadContent tag to get yourself started.
If you put the script in the master page, then that script will load and be available on every page that uses that master page.
It should be noted that many prefer their JavaScript in a separate file which you can then reference with a link tag within the head tag. Mason's link in his comment provides good information.
How to show an image in ContentPlaceHolder4 on click of a Link Button which is placed on ContentPlaceHolder3.
I Have a Master Page and one content page. On master page i have a link INSTRUMENTS by clicking on which i am redirected to content page INSTRUMENTS. Now i have 10 LINK BUTTON controls on my Content Page and i want on the click of each link button corresponding image should open on same content page but in different CntentPlaceHolder. Please guide me how to add code for Link Button Click and how to render iamge on click of Link Button.
Following is the code i have added till now.
**This is My Master Page**
<%# Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
<!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></title>
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
<style type="text/css">
.style1
{
}
.style2
{
width: 162px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div> <img src="IMAGES/main.png" style="background-color: #99FF99; border-top-color: #800000; width: 1082px; height: 105px;" />
</div>
HOME INSTRUMENTS LOGIN
ADDRESS
<table style="width: 100%; height: 288px; margin-top: 11px;">
<tr>
<td bgcolor="#FF0066" align="center" class="style2"
style="text-align: center; vertical-align: top;">
<asp:ContentPlaceHolder ID="ContentPlaceHolder3" runat="server">
</asp:ContentPlaceHolder>
</td>
<td bgcolor="#33CCCC" class="style1">
<asp:ContentPlaceHolder ID="ContentPlaceHolder4" runat="server">
</asp:ContentPlaceHolder>
</td>
</tr>
</table>
</form>
</body>
</html>
**This is My Content Page**
<%# Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="INSTRUMENTS.aspx.cs" Inherits="INSTRUMENTS" %>
<asp:Content id="content3" ContentPlaceHolderID="head" runat="server">
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder3" Runat="Server">
<asp:LinkButton ID="LinkButton1" runat="server" OnClick="lkbutton_click">Sitar</asp:LinkButton><br />
<asp:LinkButton ID="LinkButton2" runat="server">Harmonium</asp:LinkButton>
<br />
<asp:LinkButton ID="LinkButton3" runat="server">Tabla</asp:LinkButton>
<br />
<asp:LinkButton ID="LinkButton4" runat="server">Drum</asp:LinkButton>
<br />
<asp:LinkButton ID="LinkButton5" runat="server">Guitar</asp:LinkButton>
<br />
<asp:LinkButton ID="LinkButton6" runat="server">Sarod</asp:LinkButton>
<br />
<asp:LinkButton ID="LinkButton7" runat="server">Flute</asp:LinkButton>
<br />
<asp:LinkButton ID="LinkButton8" runat="server">Santoor</asp:LinkButton>
<br />
<asp:LinkButton ID="LinkButton9" runat="server" onclick="LinkButton9_Click">Keyboard</asp:LinkButton>
<br />
<asp:LinkButton ID="LinkButton10" runat="server">LinkButton</asp:LinkButton>
</asp:Content>
<asp:content ID ="C2" ContentPlaceHolderID ="ContentPlaceHolder4" runat="Server">
<asp:Image ID ="I1" ImageUrl ="~/IMAGES/F.png" >
<asp:Image />
</asp:content>
in your design page use like this.
<asp:Content ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
<img id="img1" runat="server" />
</asp:Content>
and in code behind link button click event like below:
protected void lkbutton_click(object sender, EventArgs e)
{
img1.Src = "~/images/sonata-logo.png";
}
i tested it it's working fine.
but put the correct path of image then only it will show.
Thanks
<asp:LinkButton ID="LinkButton1" runat="server" width="250px" height="250">
<img runat="server" id="IL"src="~/Class/Adds/0/4.jpg" width="250" height="250" />
</asp:LinkButton>
With this you can change the picture with server code.
il.SRC = "~/Class/Adds/0/7.jpg"
<%# Master Language="VB" CodeFile="Main.master.vb" Inherits="Main" %>
<%# Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!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></title>
<link href="CSS_Styles/twoColFixLtHdr.css" rel="stylesheet" type="text/css" />
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<script type="text/javascript">
function callAlert(msg) {
alert(msg);
}
</script>
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
<asp:ContentPlaceHolder ID="ScriptManager" runat="server">
</asp:ContentPlaceHolder>
<div class="container">
<div class="header">
<asp:LoginStatus ID="LoginStatus1" runat="server"
ForeColor="White"
CssClass="signin" Font-Size="Small"/>
<asp:LoginView ID="LoginView1" runat="server">
<AnonymousTemplate>
<asp:HyperLink ID="HyperLink1" runat="server"
CssClass="register"
ForeColor="White"
NavigateUrl="~/login.aspx" Font-Size="Small">Register</asp:HyperLink>
</AnonymousTemplate>
<LoggedInTemplate>
<asp:HyperLink ID="HyperLink2" runat="server"
NavigateUrl="~/account.aspx"
ForeColor="White"
CssClass="myaccount" Font-Size="Small">My Account</asp:HyperLink>
<asp:HyperLink ID="HyperLink5" runat="server"
NavigateUrl="~/fleaMarket/fleaMarketAccount.aspx"
ForeColor="White"
CssClass="fleaaccount" Font-Size="Small">Flea Account</asp:HyperLink>
<asp:HyperLink ID="HyperLink3" runat="server"
NavigateUrl="~/admin/access/access_rule_summary.aspx"
ForeColor="White"
CssClass="myaccount" Visible="false" Font-Size="Small">Admin</asp:HyperLink>
<asp:HyperLink ID="HyperLink4" runat="server"
NavigateUrl="~/report.aspx"
ForeColor="White"
CssClass="myaccount" Visible="false" Font-Size="Small">Report</asp:HyperLink>
</LoggedInTemplate>
</asp:LoginView>
<br />
<div id="CartAr">
<asp:Panel ID="Panel2" runat="server" Width="300px" Height="82px" BackColor="#ffffff">
<asp:Image ID="imgShpngCrt" runat="server" ImageUrl="~/Images/cart image1.jpg" Width="90px" Height="82px" CssClass="fltlft1" />
<asp:LoginView ID="LoginView2" runat="server">
<AnonymousTemplate>
<asp:Label ID="Label2" runat="server"
ForeColor="Black"
CssClass="" Font-Size="Small">Welcome!Guest.
</asp:Label>
</AnonymousTemplate>
<LoggedInTemplate>
<asp:Label ID="Label2" runat="server"
ForeColor="Black"
CssClass="" Font-Size="Small">Welcome! <asp:LoginName ID="LoginName2" runat="server" />
</asp:Label>
</LoggedInTemplate>
</asp:LoginView><br />
<div style="float:left; font-size:small;">
<asp:Label ID="lblCartItem" runat="server" Text="Items in your cart :" ForeColor="Black" Font-Size="Small"></asp:Label>
</div>
<asp:UpdatePanel ID="UpdatePanelMaster" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="True">
<ContentTemplate>
<div style="float:left; font-size:small;">
<asp:Label ID="lblcartitemcount" runat="server" Text="hahahah"></asp:Label>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<br /><br />
<asp:LinkButton ID="LinkButton1" runat="server" ForeColor="#336699" CssClass="textdeco" Font-Size="Small">View Cart</asp:LinkButton>
</asp:Panel>
</div>
<!-- end .header --></div>
<div id="navPos">
<ul id="MenuBar1" class="MenuBarHorizontal">
<li>
<asp:HyperLink ID="Home" runat="server" NavigateUrl="~/index.aspx">Home |</asp:HyperLink>
</li>
<li>
<asp:HyperLink ID="Products" runat="server" CssClass="MenuBarItemSubmenu">Products</asp:HyperLink>
<ul>
<li><asp:HyperLink ID="Groceries" runat="server">Groceries</asp:HyperLink></li>
<li><asp:HyperLink ID="DepartmentalItems" runat="server">Departmental Items</asp:HyperLink></li>
<li><asp:HyperLink ID="Electronics" runat="server">Electronics</asp:HyperLink>
<ul>
<li><asp:HyperLink ID="Mobiles" runat="server" NavigateUrl="~/itemsDisplayPage_aspx/itemsDisplayPage.aspx?typeOfItem=mobiles">Mobiles</asp:HyperLink></li>
<li><asp:HyperLink ID="Laptops" runat="server" NavigateUrl="~/itemsDisplayPage_aspx/itemsDisplayPage.aspx?typeOfItem=computers">Laptops & Computers</asp:HyperLink></li>
<li><asp:HyperLink ID="Accessories" runat="server">Accessories</asp:HyperLink></li>
</ul>
</li>
<li><asp:HyperLink ID="Kitchen" runat="server">Kitchen Items</asp:HyperLink></li>
<li><asp:HyperLink ID="HyperLink6" runat="server">Home Appliances</asp:HyperLink></li>
<li><asp:HyperLink ID="HyperLink7" runat="server">Fasion</asp:HyperLink></li>
</ul>
</li>
<li><asp:HyperLink ID="AboutUs" runat="server" NavigateUrl="~/Restaurant.aspx">| Restaurant Offers |</asp:HyperLink></li>
<li><asp:LinkButton ID="cmdMedicine" runat="server">Buy Medicines |</asp:LinkButton></li>
<li><asp:HyperLink ID="FleaMarket" runat="server" NavigateUrl="~/fleaMarket/fleaBazaar.aspx">Flea Market |</asp:HyperLink></li>
<li><asp:HyperLink ID="SellItems" runat="server" NavigateUrl="~/fleaMarket/hostItem.aspx">Sell Items |</asp:HyperLink></li>
<li><asp:HyperLink ID="WhyUS" runat="server">Why Us |</asp:HyperLink></li>
<li><asp:HyperLink ID="Payment" runat="server">Payment |</asp:HyperLink></li>
<li><asp:HyperLink ID="Contact_Us" runat="server" NavigateUrl="~/ContactUs.aspx">Contact Us</asp:HyperLink></li>
</ul>
</div><br /><br />
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
<div class="footer">
<asp:TextBox ID="txtSubscribe" runat="server"></asp:TextBox>
<asp:Button ID="cmdSubscribe" runat="server" Text="Subscribe" /><br />
<div style="text-align:center; font-size:small;">
About Us |Payment Options |<a href="#">Terms &
Conditions</a> |Return Policy |Privacy Policy ©TriceDeals.Com
2011.
</div>
<!-- end .footer --></div>
<!-- end .container --></div>
<asp:ContentPlaceHolder ID="AfterFooter" runat="server">
</asp:ContentPlaceHolder>
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", { imgDown: "SpryAssets/SpryMenuBarDownHover.gif", imgRight: "SpryAssets/SpryMenuBarRightHover.gif" });
</script>
</form>
</body>
</html>
this is my master page...i have a drop down navigation in my site which i have placed in master page...so now the problem is "the dropdown property of the navigation menu works properly in some of the pages and does not work in some oter...why does this happen??if i do not use the master page the menu work in all the pages.
You must use the tilde(~) to get the root-directory of your application, because some page might be in sub-directories and therefore have another relative path to the Styles/Scripts than other pages(#Aristos solution only works for first-level subdirectories).
You can use ~ only on server-controls, so add a runat=server on your link-tags:
<link runat="server" href="~/CSS_Styles/twoColFixLtHdr.css" rel="stylesheet" type="text/css" />
<link runat="server" hef="~/SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
To get the correct reference to your script-files you have to add ScriptReferences:
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
<Scripts>
<asp:ScriptReference Path="~/SpryAssets/SpryMenuBar.js" />
</Scripts>
</asp:ToolkitScriptManager>
I'm receiving this error on a page that previously worked fine, in fact the only change I've made to the page recently was to add another asp:TextBox and asp:RequiredFieldValidator control.
The page already had numerous ASP.NET controls on it, so I cannot see why these extra controls would make a difference, anyway I shall post the code below and hopefully you can see what the error is:
<%# Control Language="C#" AutoEventWireup="true" CodeFile="MeetingGenerator.ascx.cs"
Inherits="usercontrols_MeetingGenerator" %>
<%# Register TagPrefix="cc1" Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" %>
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<div style="width:498px;height:425px;background-color:#033b2a;text-align:center;padding-top:20px;">
<asp:Label ID="lblDone" CssClass="done" runat="server"></asp:Label>
<asp:Panel id="pnlAddReport" runat="server">
<div>
<img src="../images/banners/add-meeting.png" alt="Add Report" />
</div>
<p>
<asp:ValidationSummary ID="ValidationSummary" CssClass="validationsummary" runat="server" />
<asp:TextBox ID="txtTitle" BorderStyle="None" CssClass="watermark"
Width="250px" Height="22px" runat="server"></asp:TextBox>
<cc1:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" TargetControlID="txtTitle" WatermarkCssClass="watermark"
WatermarkText=" Meeting title" runat="server"></cc1:TextBoxWatermarkExtender>
<asp:RequiredFieldValidator ID="rfvTitle" ControlToValidate="txtTitle" Text=""
ErrorMessage="Please enter the title" Display="None"
InitialValue="" runat="server"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="rfvTitle1" ControlToValidate="txtTitle" Text=""
ErrorMessage="Please enter the title" Display="None"
InitialValue=" Meeting title" runat="server"></asp:RequiredFieldValidator>
</p>
<p>
<asp:TextBox ID="txtDate" BorderStyle="None" CssClass="watermark"
Width="250px" Height="22px" runat="server"></asp:TextBox>
<cc1:CalendarExtender ID="ceDate" TargetControlID="txtDate" Format="dd/MM/yyyy" runat="server">
</cc1:CalendarExtender>
<cc1:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender2" TargetControlID="txtDate" WatermarkCssClass="watermark"
WatermarkText=" Meeting Date" runat="server"></cc1:TextBoxWatermarkExtender>
<asp:RequiredFieldValidator ID="rfvDate" ControlToValidate="txtDate" Text=""
ErrorMessage="Please select the meeting date" Display="None"
InitialValue="" runat="server"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="rfvDate1" ControlToValidate="txtDate" Text=""
ErrorMessage="Please select the meeting date" Display="None"
InitialValue=" Meeting Date" runat="server"></asp:RequiredFieldValidator>
</p>
<p>
<asp:TextBox ID="txtMeetingTime" BorderStyle="None" Width="250px" Height="22px" MaxLength="5"
runat="server"></asp:TextBox>
<cc1:TextBoxWatermarkExtender ID="tweMeetingTime" TargetControlID="txtMeetingTime" WatermarkCssClass="watermark"
WatermarkText=" Time (HH:MM)" runat="server"></cc1:TextBoxWatermarkExtender>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txtMeetingTime" Text=""
ErrorMessage="Please enter the meeting time" Display="None"
InitialValue="" runat="server"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="RequiredFieldValidator11" ControlToValidate="txtMeetingTime" Text=""
ErrorMessage="Please enter the meeting time" Display="None"
InitialValue=" Time (HH:MM)" runat="server"></asp:RequiredFieldValidator>
</p>
<p>
<asp:TextBox ID="txtLocation" BorderStyle="None" CssClass="watermark"
Width="250px" Height="22px" runat="server"></asp:TextBox>
<cc1:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender3" TargetControlID="txtLocation" WatermarkCssClass="watermark"
WatermarkText=" Location" runat="server"></cc1:TextBoxWatermarkExtender>
<asp:RequiredFieldValidator ID="rfvLocation" ControlToValidate="txtLocation" Text=""
ErrorMessage="Please enter the location" Display="None"
InitialValue="" runat="server"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="rfvLocation1" ControlToValidate="txtLocation" Text=""
ErrorMessage="Please enter the location" Display="None"
InitialValue=" Location" runat="server"></asp:RequiredFieldValidator>
</p>
<p>
<asp:ImageButton ID="btnAddMeeting" ImageUrl="/images/buttons/addmeeting-btn.gif" runat="server" OnClick="btnAddMeeting_Click" />
</p>
<p>
</p>
</asp:Panel>
</div>
<%# Master Language="C#" MasterPageFile="/masterpages/Master.master" AutoEventWireup="true" %>
<asp:content ContentPlaceHolderId="additionalhead" runat="server">
</asp:content>
<asp:content ContentPlaceHolderId="additionalbody" runat="server">
<umbraco:Macro Alias="AddMeeting" runat="server"></umbraco:Macro>
</asp:content>
<asp:content ContentPlaceHolderId="bodyContent" runat="server">
</asp:content>
<%# Master Language="C#" AutoEventWireup="true" %>
<!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><umbraco:Item field="title" runat="server"></umbraco:Item></title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script>
<script type="text/javascript" src="/js/jQueryString-2.0.2-Min.js"></script>
<link rel="stylesheet" type="text/css" href="/css/Styles.css" />
<link rel="stylesheet" type="text/css" href="/css/Layout.css" />
<link rel="stylesheet" type="text/css" href="/css/Forms.css" />
<script type="text/javascript" language="javascript">
$(document).ready(function () {
$('#uploadAgenda').hide();
$('#uploadMinutes').hide();
$('#<%=txtSearchEAA.ClientID%>').val('Search EAA');
var st = $.getQueryString({ ID:"search" });
if (st != '') {
$('#<%=txtSearchEAA.ClientID%>').val(st);
};
$('#<%=txtSearchEAA.ClientID%>').click(function() {
$('#<%=txtSearchEAA.ClientID%>').val('');
});
});
</script>
<script type="text/C#" runat="server">
protected void btnSearch_Click(object sender, EventArgs e)
{
Response.Redirect("/members/search-results?search=" + txtSearchEAA.Text);
}
</script>
<asp:ContentPlaceHolder id="additionalhead" runat="server"></asp:ContentPlaceHolder>
<umbraco:Item field="AdditionalHead" runat="server"></umbraco:Item>
</head>
<body style="background-color:#e5e5e5;">
<script runat="server">
protected void btnLogout_Click(object sender, EventArgs e)
{
FormsAuthentication.SignOut();
Response.Redirect("/login");
}
</script>
<form id="form1" runat="server">
<asp:ContentPlaceHolder id="additionalbody" runat="server"></asp:ContentPlaceHolder>
<div class="wrapper">
<div class="content">
<div class="banner">
<div class="bannerSearchSpacer">
<h1><span>EAA</span></h1>
</div>
<div class="aboutEAA">
</div>
<div class="bannerSearchAligns">
<div class="searchbox">
<asp:TextBox ID="txtSearchEAA" CssClass="watermark"
Width="155px" runat="server"></asp:TextBox>
</div>
<div class="searchButton">
<asp:ImageButton ID="imbSearch" ImageUrl="/images/buttons/go.gif" OnClick="btnSearch_Click" runat="server" />
</div>
<div style="clear:both;"></div>
</div>
<div class="loginBox">
<dl>
<dt>Hello</dt>
<dd><umbraco:Macro Alias="MemberName" runat="server"></umbraco:Macro></dd>
<dt>Arena</dt>
<dd><umbraco:Macro Alias="MemberArena" runat="server"></umbraco:Macro></dd>
</dl>
<div><asp:ImageButton ID="btnLogout" ImageUrl="/images/buttons/logout.gif" runat="server" OnClick="btnLogout_Click" /></div>
</div>
<div style="clear:both;"></div>
</div>
<div id="contentarea">
<div class="menuLeft">
<div class="menuPlaceholder">
<umbraco:Macro Alias="DynamicMenu" runat="server"></umbraco:Macro>
</div>
</div>
<div class="mainBody">
<asp:ContentPlaceHolder id="bodyContent" runat="server"></asp:ContentPlaceHolder>
</div>
<div style="clear:both;"></div>
</div>
</div>
</div>
</form>
<umbraco:Macro Alias="MemberAnalytics" runat="server"></umbraco:Macro>
</body>
</html>
Try changing <%= to <%# within your jQuery script. Check out this article
It was sorted by removing the code blocks from the jQuery selectors and changing them to name*= selectors instead. Changing <%= to <%# did not solve the problem, hopefully the selector change will work for other people.