Link to home
Start Free TrialLog in
Avatar of gbzhhu
gbzhhuFlag for United Kingdom of Great Britain and Northern Ireland

asked on

ASP:Calendar will not allow me to set NextMonthText to an image

I am doing this

                  <asp:calendar id="Calendar3" style="Z-INDEX: 103; LEFT: 400px; POSITION: absolute; TOP: 56px"
                        runat="server" Width="220px" ForeColor="#003399" BorderWidth="1px" BackColor="White" DayNameFormat="FirstLetter"
                        Height="200px" Font-Size="8pt" Font-Names="Verdana" BorderColor="#3366CC" CellPadding="1"
                        OnSelectionChanged="DateSelected">
                        <TodayDayStyle ForeColor="White" BackColor="#99CCCC"></TodayDayStyle>
                        <SelectorStyle ForeColor="#336666" BackColor="#99CCCC"></SelectorStyle>
                        <NextPrevStyle Font-Size="8pt" ForeColor="#CCCCFF"></NextPrevStyle>
                        <DayHeaderStyle Height="1px" ForeColor="#336666" BackColor="#99CCCC"></DayHeaderStyle>
                        <SelectedDayStyle Font-Bold="True" ForeColor="#CCFF99" BackColor="#009999"></SelectedDayStyle>
                        <TitleStyle Font-Size="10pt" Font-Bold="True" Height="25px" BorderWidth="1px" ForeColor="#CCCCFF"
                              BorderStyle="Solid" BorderColor="#3366CC" BackColor="#003399"></TitleStyle>
                        <WeekendDayStyle BackColor="#CCCCFF"></WeekendDayStyle>
                        <OtherMonthDayStyle ForeColor="#999999"></OtherMonthDayStyle>
                                                       NextMonthText = "<img src='/quickstart/aspplus/images/monthright.gif' border=0>"
                        PrevMonthText = "<img src='/quickstart/aspplus/images/monthleft.gif' border=0>"
                        SelectorStyle-BackColor="#99ccff"
                        SelectWeekText = "<img src='/mages/selweek.gif' border=0 onmouseover=this.style.backgroundColor='#ffcc66' onmouseout=this.style.backgroundColor='#99ccff'>"
                        SelectMonthText = "<img src='/images/selmonth.gif' border=0 onmouseover=this.style.backgroundColor='#ffcc66' onmouseout=this.style.backgroundColor='#99ccff'>"
                  </asp:calendar>

The control is not created. There is an error "type System.Web.UI.WebControls.Calendar does not have a property named img"  The above code is adapted from the QuickStart  http://samples.gotdotnet.com/quickstart/aspplus/samples/webforms/ctrlref/webctrl/calendar/doc_cal.aspx

Anybody knows what I am doing wrong.  I am using VS.NET 2003 and .NET 1.1

Thanks

ASKER CERTIFIED SOLUTION
Avatar of the_paab
the_paab

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gbzhhu

ASKER

Thank you thata worked fine.  Am I right that I was closing the tag in the wrong place because NextMonthText  is an attribute of asp:calendar but I had NextMonthText  outside of the asp:calendar tag

Thanks again