Results 1 to 2 of 2

Thread: [RESOLVED] validate insertion via a javscript/jquery or code behind

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2007
    Location
    Karachi
    Posts
    551

    Resolved [RESOLVED] validate insertion via a javscript/jquery or code behind

    i have certain validation check via a jquery/javascript in asp.net 3.5 vb.net

    Code:
    <script type="text/javascript">
    
             $(function() {
                 $('#<%= btn_submitt.ClientID %>').click(function() {
    
                     valid = true;
                     var checkedControls = $('#<%= CheckBoxList1.ClientID %>').find('input:checkbox:checked');
                     var selected = jQuery('#<%= Rdbtn_hotelbook.ClientID %> input:checked').val();
    
                     if (checkedControls.length == 0) {
    
                         alert('Please select atleast one checkbox from Company Type');
    
                     }
                     else if (selected == 0) {
                         var checkedControls1 = $('#<%= hotel_requirement_Types.ClientID %>').find('input:checkbox:checked');
    
                         if (checkedControls1.length == 0) {
    
                             alert('Please select atleast one from hotel requirement');
    
                         }
    
                       
                         //             alert('u need to explore placeholder');
    
                     }
    
                 });
    
    
                 return false;
    
    
             });    
           
           </script>
    and on submitt button i have following code (see my next post in same thread)

    it is validation through jquery/javascript but when it comes to code behind it insert when else conditon is true . now the problem is that i want to pass certain variable from jquery/javascript to code behind to validate that u can isnert to tables(mind that i am inserting stuff to multiple table) the main table is users .and it returns userid and i insert into another tables by using same userid.

    i hope i m quite clear about my problem if it is still not please post me back
    any urgent reply would be really helpful
    There is no achievement without goals

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2007
    Location
    Karachi
    Posts
    551

    Re: validate insertion via a javscript/jquery or code behind

    see attachment of btn submit code
    Attached Files Attached Files
    There is no achievement without goals

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width