I am trying to create a simple course registration web site in asp.net. I am now creating a page that allows a user to create a course. Here is the related user interface:
And here is the code of this page:
<%# Page Language="C#" AutoEventWireup="true" CodeFile="AdminCreateCourse.aspx.cs"
Inherits="AdminCreateCourse" %>
<!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>
<style type="text/css">
.style1
{
font-size: x-large;
}
.style3
{
font-size: small;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div class="style1">
<strong>Create Course</strong></div>
<p>
</p>
<p>
Instructor Name:
<asp:DropDownList ID="dInstructorSelect" runat="server" DataSourceID="SqlDataSource1"
DataTextField="FullName" DataValueField="FullName" Height="16px" Width="202px">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [Name] + ' ' + [Surname] as FullName FROM [InstructorTable] ORDER BY [Name]">
</asp:SqlDataSource>
</p>
<p>
Course Name:
<asp:TextBox ID="tCourseName" runat="server"></asp:TextBox>
</p>
<p>
Course ID<br />
(Subject/Course):
<asp:DropDownList ID="dSubject" runat="server" Width="70px">
<asp:ListItem>CS</asp:ListItem>
<asp:ListItem>CULT</asp:ListItem>
<asp:ListItem>ECON</asp:ListItem>
<asp:ListItem>IS</asp:ListItem>
<asp:ListItem>MAN</asp:ListItem>
<asp:ListItem>SPS</asp:ListItem>
<asp:ListItem>VACD</asp:ListItem>
<asp:ListItem>BIO</asp:ListItem>
<asp:ListItem>EE</asp:ListItem>
<asp:ListItem>EL</asp:ListItem>
<asp:ListItem>MAT</asp:ListItem>
<asp:ListItem>ME</asp:ListItem>
<asp:ListItem>MS</asp:ListItem>
<asp:ListItem>TE</asp:ListItem>
</asp:DropDownList>
<asp:TextBox ID="tCourse" runat="server" Width="70px"></asp:TextBox>
</p>
<p>
CRN:
<asp:TextBox ID="tCRN" runat="server"></asp:TextBox>
</p>
<p>
Level:
<asp:DropDownList ID="dLevel" runat="server">
<asp:ListItem>Undergraduate</asp:ListItem>
<asp:ListItem>Graduate</asp:ListItem>
</asp:DropDownList>
</p>
<p>
Term:
</p>
<p>
Course Description:
</p>
<p>
<asp:TextBox ID="tCourseDescription" runat="server" Height="138px" Width="406px"></asp:TextBox>
</p>
<p>
Capacity:
<asp:TextBox ID="tCapacity" runat="server"></asp:TextBox>
</p>
<p>
Class Hour and Day: <span class="style3">Start Hour:
<asp:DropDownList ID="dHourStart" runat="server">
<asp:ListItem>8:40</asp:ListItem>
<asp:ListItem>9:40</asp:ListItem>
<asp:ListItem>10:40</asp:ListItem>
<asp:ListItem>11:40</asp:ListItem>
<asp:ListItem>12:40</asp:ListItem>
<asp:ListItem>13:40</asp:ListItem>
<asp:ListItem>14:40</asp:ListItem>
<asp:ListItem>15:40</asp:ListItem>
<asp:ListItem>16:40</asp:ListItem>
<asp:ListItem>17:40</asp:ListItem>
<asp:ListItem>18:40</asp:ListItem>
<asp:ListItem>19:40</asp:ListItem>
</asp:DropDownList>
End Hour:
<asp:DropDownList ID="dHourEnd" runat="server">
<asp:ListItem>10:30</asp:ListItem>
<asp:ListItem>11:30</asp:ListItem>
<asp:ListItem>12:30</asp:ListItem>
<asp:ListItem>13:30</asp:ListItem>
<asp:ListItem>14:30</asp:ListItem>
<asp:ListItem>15:30</asp:ListItem>
<asp:ListItem>16:30</asp:ListItem>
<asp:ListItem>17:30</asp:ListItem>
<asp:ListItem>18:30</asp:ListItem>
<asp:ListItem>19:30</asp:ListItem>
<asp:ListItem>20:30</asp:ListItem>
<asp:ListItem>9:30</asp:ListItem>
</asp:DropDownList>
Day:</span> <asp:DropDownList ID="dDay" runat="server">
<asp:ListItem>Monday</asp:ListItem>
<asp:ListItem>Tuesday</asp:ListItem>
<asp:ListItem>Wednesday</asp:ListItem>
<asp:ListItem>Thursday</asp:ListItem>
<asp:ListItem>Friday</asp:ListItem>
</asp:DropDownList>
<asp:Button ID="bAddCourseHour" runat="server" Text="Add" OnClick="bAddCourseHour_Click" />
</p>
<p>
Prerequisites:
<asp:TextBox ID="tPreq1" runat="server" Width="100px"></asp:TextBox>
<asp:TextBox ID="tPreq2" runat="server" Width="100px"></asp:TextBox>
<asp:TextBox ID="tPreq3" runat="server" Width="100px"></asp:TextBox>
</p>
<asp:Button ID="bSubmit" runat="server" Text="Submit" OnClick="bSubmit_Click" />
<asp:Button ID="bClear" runat="server" Text="Clear" OnClick="bClear_Click" />
</form>
</body>
</html>
My question is, a course may be held in more than one different days, but my interface only allows one day. Should i handle this using AJAX, or is there any other way? If i should use ajax, how can i do this?
Thanks
I assume you are looking for a way to allow multiple selections on the "Day" field. If so, you have at least couple of options here:
1) Either use the CheckBoxList Control (http://msdn.microsoft.com/enIN/library/8bw4x4wa(v=vs.90).aspx).
2) Or, if real estate is an issue, use the DropDownCheckBoxes control at http://dropdowncheckboxes.codeplex.com/
Related
I am using an ASP.NET Wizard control to display a multi steps process. I have to make the form accessible with NVDA screen reader and with all browsers. The form is accessible in Chrome as the NVDA is reading the screen from the top This is header to bottom in order. But when checking the same form in Firefox + NVDA, the focus is sometimes moving to middle and sometimes to the footer. My requirement is screen reader should always read from the This is header in all the wizard steps. Please, I need your help to solve the issue. My Code is as below:
<%# Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WizardRadioButtonListDemo.Default" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Accessibile Form</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Wizard ID="Wizard1" runat="server" DisplaySideBar="false">
<HeaderTemplate>
<h1>This is header</h1>
</HeaderTemplate>
<WizardSteps>
<asp:WizardStep ID="WizardStep1" runat="server" Title="Step 1">
<fieldset id="Fieldset1" runat="server">
<legend id="Legend1" runat="server">Type</legend>
<asp:RadioButtonList ID="rdoServiceType" RepeatLayout="Flow" runat="server">
<asp:ListItem Text="Gold" Value="0">Gold</asp:ListItem>
<asp:ListItem Text="Siver" Value="1">Silver</asp:ListItem>
<asp:ListItem Text="Premium" Value="2">Premium</asp:ListItem>
</asp:RadioButtonList>
</fieldset>
</asp:WizardStep>
<asp:WizardStep>
<asp:FileUpload ID="FileUpload1" runat="server" />
<asp:Button ID="btnFileUpload" runat="server" Text="Upload" />
</asp:WizardStep>
<asp:WizardStep ID="WizardStep2" runat="server" Title="Step 2">
<fieldset id="Fieldset2" runat="server">
<legend id="Legend2" runat="server">User</legend>
<asp:Label ID="lblFirstName" runat="server" Text="First Name" AssociatedControlID="txtFirstName"></asp:Label>
<asp:TextBox ID="txtFirstName" runat="server"></asp:TextBox>
<asp:Label ID="lblLastName" runat="server" Text="Last Name" AssociatedControlID="txtLastName"></asp:Label>
<asp:TextBox ID="txtLastName" runat="server"></asp:TextBox>
</fieldset>
</asp:WizardStep>
</WizardSteps>
</asp:Wizard>
</div>
</form>
<p>© 2017 Test LLC.. All rights reserved. Powered by Test</p>
</body>
</html>
Okay so heres the issue I think. So you want the user to read the h1 by tabbing. One solution would be to add a tab-index of 0 to the header.
Why?
Because by default html, the only tabbable elements are Links, buttons, & inputs. H1's and p-tags don't do that. But they can if you give them a tab-index of 0...
So add this:
<HeaderTemplate tabindex="0">
<h1>This is header</h1>
</HeaderTemplate>
I might've interpreted your question wrong. If that's not the case, you can always add tab-index of positive values to your form in the sections you want it to go to.
Such as:tab-index="1"
... etc, and keep going up.
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.
The below code was working fine and i accidentally deleted ajax toolkit and when i reconfigured it its nit showing calender on clicking over text box.please tell me what to do with it .
moreover i request you to reply soon
<%# Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/emp.Master" CodeBehind="empleaveapp.aspx.vb" Inherits="abc.WebForm10" %>
<%# Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<head />.
<%--
<head id="Head2" runat="server" />.
--%>
<head />.
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:Label ID="Label1" runat="server" Text="From"></asp:Label>
<asp:TextBox ID="calefrom" runat="server" CssClass="textbox" Height="16px"
Width="157px"></asp:TextBox>
<cc1:CalendarExtender ID="calefrom_CalendarExtender" runat="server"
Enabled="True" TargetControlID="calefrom" Format="yyyy-MM-dd">
</cc1:CalendarExtender>
<asp:CompareValidator ID="CompareValidator2" runat="server"
ControlToCompare="txttdate" ControlToValidate="calefrom" CssClass="active"
ErrorMessage="Please enter a day after today's date"
Operator="GreaterThan" > </asp:CompareValidator>
<br />
<asp:TextBox ID="txttdate" runat="server" Width="1px"></asp:TextBox>
<br />
<asp:Label ID="Label2" runat="server" Text="To"></asp:Label>
<asp:TextBox ID="caleto" runat="server" Height="20px" CssClass="textbox"></asp:TextBox>
<cc1:CalendarExtender ID="caleto_CalendarExtender" runat="server"
Enabled="True" TargetControlID="caleto" Format="yyyy-MM-dd">
</cc1:CalendarExtender>
<asp:CompareValidator ID="CompareValidator1" runat="server" Format="yyyy-MM-dd"
ControlToCompare="calefrom" ControlToValidate="caleto"
ErrorMessage="To date can not be smaller then from date"
Operator="GreaterThanEqual"></asp:CompareValidator>
<br />
<br />
<asp:Label ID="Label3" runat="server" Text="Reason"></asp:Label>
<asp:TextBox ID="txtreason" runat="server"
CssClass="textbox"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="txtreason"
ErrorMessage="Reason is must for manager to know better"></asp:RequiredFieldValidator>
<br />
<br />
<asp:Button ID="Button1" runat="server" Text="Send Request" />
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
</asp:Content>
It's your ScriptManager. It should be cc1:ToolkitScriptManager and not asp:ScriptManager. You need the toolkit's scripts for the extenders to work.
I have a requirement to show edit panel as second row of a datagrid upon addnew link click. for this I have taken a div which has set display:none. I am able to show as second row upon addnew link click. now the actual problem starts.
this div got a text box which is tied to calendar extender to behave as a claendar upon textbox click. but calendar is not showing up when the html of invisible div is inserted as second row of grid. please let me know if anyone need code for better understanding the problem. any help will be appreciated.
In your gridview put a templatedfield instead of a div. make that templated field hold a textbox and calender extender.
<asp:GridView ID="GridView1" runat="server">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:TextBox ID="textbox1" runat="server"></asp:TextBox>
<asp:CalendarExtender ID="CalendarExtender1" TargetControlID="textbox1" runat="server">
</asp:CalendarExtender>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
but If you want it when your inserting you should put
<asp:GridView ID="GridView1" runat="server">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:TextBox ID="textbox1" runat="server"></asp:TextBox>
<asp:CalendarExtender ID="CalendarExtender1" TargetControlID="textbox1" runat="server">
</asp:CalendarExtender>
</ItemTemplate>
<InsertItemTemplate>
<asp:TextBox ID="textbox1" runat="server"></asp:TextBox>
<asp:CalendarExtender ID="CalendarExtender1" TargetControlID="textbox1" runat="server">
</asp:CalendarExtender>
</InsertItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
I hope this helps.
<%# Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%# Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxControlToolkit" %>
<!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>
<script src="jquery-1.4.1.js" type="text/javascript"></script>
<script type="text/javascript">
function AddCalendars()
{
//The last parameter should be the TargetControl's id. If you use "TextBox1", the TextBox1 would be associated.
var elem = $(".deneme");
for (var a = 0; a < elem.length; a++)
{
if ($find("CalendarExtender" + elem[a].id))
{
$find("CalendarExtender" + elem[a].id).dispose();
}
}
for (var i = 0; i < elem.length; i++)
{
$create(AjaxControlToolkit.CalendarBehavior, { "id": "CalendarExtender" + elem[i].id }, null, null, elem[i]);
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<%--the dummy calendar which is used to download the related script file.--%>
<asp:TextBox ID="dummyTextBox" runat="server" Style="display: none"></asp:TextBox>
<AjaxControlToolkit:CalendarExtender ID="dummyCalendarExtender" runat="server" Enabled="True"
TargetControlID="dummyTextBox">
</AjaxControlToolkit:CalendarExtender>
<%--the dummy calendar which is used to download the related script file.--%>
<asp:Button ID="Button1" OnClientClick="AddCalendars();return false" runat="server"
Text="CreateCalendarFromClient" /><br />
input:<input id="deneme1" type="text" class="deneme" /><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
TextBox:
<asp:TextBox ID="deneme2" runat="server" cssclass="deneme" ClientIDMode="Static"></asp:TextBox>
</div>
</form>
</body>
</html>
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.