Skip to content
Loading
  • 0
    how to check that post data is received or not is any otherway except if checking null
    0
  • 0
    Hi saravana,
     
    Try below code instead.
     
    1. if (IsPostBack)
    2. {  
    3. string[] keys = Request.Form.AllKeys; //getting all form data in string array      
    4. var value = ""; //local variable      
    5. for (int i= 0; i < keys.Length; i++)       
    6. {      
    7.    value = Request.Form[keys[i]];      
    8.   // Request.Form[keys[i]] is a get value of form element      
    9.   // Store this values in model and and you can write your code to save in database      
    10. }    
    11. } 
     
    0
  • 0
    request.form["name_of_the_field"]
     
    replace the name_of_the_field with the name of control on the form 
    0