Error in doPostBack function for Calendar control

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

  1. Koi

    Koi Guest

    Hi,

    I'm having the same problem as this guy:

    http://groups-beta.google.com/group...ework.aspnet.webcontrols/msg/59a5232d241fc119

    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 =
    document._ctl0:Form1;"

    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
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Johno

    doPostBack client-side function

    Johno, Jul 18, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    7,812
    Johno
    Jul 21, 2003
  2. Matt Petteys
    Replies:
    0
    Views:
    495
    Matt Petteys
    Aug 14, 2003
  3. tfs

    doPostBack error

    tfs, Jun 28, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    666
  4. =?Utf-8?B?Q2VzYXI=?=

    adding extra code to the doPostBack function

    =?Utf-8?B?Q2VzYXI=?=, Jun 16, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    1,534
    Craig Deelsnyder
    Jun 16, 2005
  5. Marko Vuksanovic

    Problem with FileUpload control and doPostback

    Marko Vuksanovic, Jun 30, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    7,585
    =?Utf-8?B?c2FyYQ==?=
    Jul 2, 2006
Loading...

Share This Page