CustomValidator does not accept RegisterStartupScript

Discussion in 'ASP .Net Web Controls' started by Ricardo Maciel, Jan 25, 2005.

  1. Hi,

    I am using CustomValidator and want to keep the client-side function in a .js
    file. I was unable to make this work with Page's RegisterStartupScript --
    it produces 'jscript runtime error object expected'.

    If I manually insert the function in the html form, the control works fine.

    Is there a way to resolve this issue?

    thanks,

    Ricardo
    Ricardo Maciel, Jan 25, 2005
    #1
    1. Advertising

  2. Peter,

    Thanks for the answer. A bug in the text output is probably what happened.
    When I restored the .js file arrangement (that I had given up from) to send
    the code you asked, everything worked!

    Ricardo

    "Peter Blum" wrote:

    > The error indicates that there is a bug in the text output by
    > RegisterStartupScript. Please post the server-side code and also the HTML
    > output on the page for this code.
    >
    > --- Peter Blum
    > www.PeterBlum.com
    > Email:
    > Creator of "Professional Validation And More" at
    > http://www.peterblum.com/vam/home.aspx
    >
    > "Ricardo Maciel" <mailboxrmaciel at serverdatafactordotcomdotbr> wrote in
    > message news:...
    > > Hi,
    > >
    > > I am using CustomValidator and want to keep the client-side function in a
    > > .js
    > > file. I was unable to make this work with Page's RegisterStartupScript --
    > > it produces 'jscript runtime error object expected'.
    > >
    > > If I manually insert the function in the html form, the control works
    > > fine.
    > >
    > > Is there a way to resolve this issue?
    > >
    > > thanks,
    > >
    > > Ricardo

    >
    >
    >
    Ricardo Maciel, Jan 27, 2005
    #2
    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. =?Utf-8?B?Vmk=?=

    CustomValidator does not fire

    =?Utf-8?B?Vmk=?=, Nov 7, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    2,216
    Kumar Reddi
    Nov 8, 2004
  2. Mo
    Replies:
    3
    Views:
    2,161
    Mo hariri
    Jan 15, 2005
  3. Beffmans

    CustomValidator does not work

    Beffmans, Aug 8, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    1,945
  4. Robert Jones
    Replies:
    5
    Views:
    15,942
    Robert Jones
    Jul 10, 2003
  5. Anonymous
    Replies:
    2
    Views:
    28,580
    phamlen
    Aug 31, 2006
Loading...

Share This Page