Hi,
I have the following script within a user control
When I add the user control to a test page and click the button, nothing happens.
If I move this code to the test page itself (default.aspx), clicking the button calls the web method and returns successully.
So, I conclude that it isn't possible to do this within a user control which seems rather restrictive.... ...or am I missing something?
Any help....most appreciated!
Kind Regards
Richard.
I have the following script within a user control
Code:
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script> <script type="text/javascript"> jQuery().ready(function() { $("#btnNext").click(function() { var options = { type: "POST", url: "/services/UserServices.asmx/ValidateFields", data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", success: function(ret) { alert(ret); } }; $.ajax(options); }); }); </script> <input id="btnNext" type="button" value="Next" />
When I add the user control to a test page and click the button, nothing happens.
If I move this code to the test page itself (default.aspx), clicking the button calls the web method and returns successully.
So, I conclude that it isn't possible to do this within a user control which seems rather restrictive.... ...or am I missing something?
Any help....most appreciated!
Kind Regards
Richard.
Comment