Problem with Popup calendar control

  • Thread starter Thread starter Vishal
  • Start date Start date
V

Vishal

Hey,

I have a popup calendar control implemented in a user
control. Now I need to send the date which the user has
entered manually in the textbox to that control via a
querystring. So I thought I could do something like this:

<asp:TextBox id="txbAddStartDate" Text="<%#SetTodaysDate()%
" Runat="server" Columns="10"></asp:TextBox>
<asp:HyperLink id="linkAddStartDate" runat="server"
ImageUrl="/images/smallcalendar.gif"
navigateurl="javascript:calendar_window=window.open
('popup_calendar.aspx?formname=Form1.txbAddStartDate
& "&cur_date=" & <%#txbAddStartDate.Text%>
& "','DatePicker','width=250,height=255,left=270,top=180');
calendar_window.focus();"></asp:HyperLink>

However I get the message that this server tag is not well
formed. I am not sure how to solve this problem, as <%
#txbAddStartDate.Text%> is causing it...can somebody help
me out?
 
Hi,

This error must be coming when ur shiting from HTML to
design view. Solution to this is use single quotes
instead of Double quotes for enclosin ASP tags
like

Text='<%#SetTodaysDate()%>'

instead of

Text="<%#SetTodaysDate()%>"

Hope this helps

Pradeep
 
Back
Top