Problem with Popup calendar control

Discussion in 'ASP .Net' started by Vishal, Dec 10, 2004.

  1. Vishal

    Vishal Guest

    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()%
    <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?
     
    Vishal, Dec 10, 2004
    #1
    1. Advertisements

  2. Vishal

    Pradeep Guest

    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
     
    Pradeep, Dec 10, 2004
    #2
    1. Advertisements

  3. Vishal

    Pradeep Guest

    Hey

    Sorry,
    Please read shifting instead of shi.....

    Bye

    Pradeep
     
    Pradeep, Dec 10, 2004
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.