Post method json data and receive in aspx file
<p>Hello I'm using jQuery AJAX to send a data to my aspx file. Here is my AJAX:</p>

<pre><code>$(document).ready(function() {
    $('#openmodal').click(function() {
        var id = $(this).attr('data-id');
        $.ajax({
            type: "POST",
            url: "Video.aspx",
            contentType: "application/x-www-form-urlencoded; charset=utf-8",
            data: {
                "videoid": "id"
            },
            dataType: "json",
            success: function(resultData) {
                console.log(resultData);
            },
            error: function(errordata) {
                console.log(errordata);
            }
        });
    });
});
</code></pre>

<p>My aspx.cs</p>

<pre><code>protected void Page_Load(object sender, EventArgs e) {
    string query = Request.QueryString[0];
    if (query != null) {
        if (!IsPostBack) {
            gvShow.DataSource = VideoBL.GetVideo(query);
            gvShow.DataBind();
        }
    }
}
</code></pre>

<p>But I keep getting this error: </p>

<blockquote>
  <p>System.ArgumentOutOfRangeException</p>
  
  <p>An exception of type 'System.ArgumentOutOfRangeException' occurred in
  mscorlib.dll but was not handled in user code</p>
  
  <p>Additional information: Index was out of range. Must be non-negative
  and less than the size of the collection.</p>
</blockquote>