how to add javascript in a asp.net page containing user control

Last post 09-03-2007 8:37 PM by prowla2003. 1 replies.

Sort Posts:

  • how to add javascript in a asp.net page containing user control

    09-03-2007, 7:32 AM

    Hi all,

    I am having two queries(ASP.NET 1.1):

    1>I am having an aspx page,which contains some .ascx pages also.In one of those ascx page i am having two date fields.I want to compare the two date fields at client side ie using client side scripting in javascript.There is a "save" button in the aspx page.Can you please help me out on how to go for it..like in which page(aspx or ascx page) should i write the script and where to bind that function.The ascx page isnt having any such button field.

    2>The above mentioned ascx page is also having two drop down list.the value in second one DDL depends on the value selected in 1st DDL.Initially the second DDL will have common values.The 1st DDL's selected value will act as filter criteria for the value in 2nd.Is there any way to do it without postback...ie thru client side scripting?

     

  • Re: how to add javascript in a asp.net page containing user control

    09-03-2007, 8:37 PM
    Answer
    • Loading...
    • prowla2003
    • Joined on 06-10-2003, 5:10 AM
    • Sydney
    • Posts 129

     have you looked at the asp.net validator controls..

    • The RequiredFieldValidation Control
    • The CompareValidator Control
    • The RangeValidator Control
    • The RegularExpressionValidator Control
    • The CustomValidator Control

    nice thing about these Validation controls is that it will preform client-side validation when it detects the browser is able (unless client-side validation has been disabled). Thus reducing roundtrips. And it will preform server-side where necessary

     

     

    Paul.

    If you want Reflexology in Sydney then click on the link...

Page 1 of 1 (2 items)
Microsoft Communities
Page view counter