Error in doPostBack function for Calendar control

Discussion in 'ASP .Net Web Controls' started by Koi, Apr 12, 2005.

  1. Koi

    Koi Guest


    I'm having the same problem as this guy:

    Basically it comes down to this:

    - I have an "application template" (.aspx) that loads user controls
    - The <form> tag(s) are in the user controls (.ascx)
    - One of these user controls has a Calendar control
    - When you view the page in a browser, .NET has given the form the
    name: "_ctl0:Form1"
    - The __doPostBack javascript function contains the line: "theform =

    Now this isn't valid javascript, and of course the postback doesn't
    work (plus a javascript error on page load).

    I'm guessing this is a bug, since it is .NET that generates illegal
    javascript code, while it should be possible to have a calendar control
    within a user control, right?

    Is there a workaround? Can I write my own __doPostBack function and use
    eg. forms[0] instead of the form name?

    Putting the <form> within the .aspx is not an option, as there already
    numerous applications where the <form> is in the .ascx.

    Any help is greatly appreciated.
    Koi, Apr 12, 2005
    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.