Question: I was trying to output a single List variable that retrieves data from database via a CodeBehind code to a text field in ASPX:

```
<asp:TextBox ID="TBCluster" runat="server" CssClass="textbox"></asp:TextBox>  

```

C# is used and the code goes something like this:

```
public List<shuffleDataList> pullShuffledData(SqlDataReader rdr)
{
    List<shuffleDataList> callList = new List<shuffleDataList>();      
    if (rdr != null)
    {
         if (rdr.HasRows)
         { 
             while (rdr.Read())
             {   
                 callList.Add(new shuffleDataList()
                 {
                      cluster = rdr.IsDBNull(5) ? null : rdr.GetString(5),
                 });   
             }
         }
         else
         {
             Response.Write("<script>alert('the data is null')</script>");
             return null;
         }
     }
     return callList;
 }

```

The retrieval of cluster field will occur after a user clicks on a particular button and so my passing the variable goes into like the following:

```
protected void shuffle_Click(object sender, EventArgs e)
{
   getdata();
   TBCluster.Text = new shuffleDataList().cluster;
}

```

However nothing is displayed on the textfield. On the same query, I can display the data on a datagrid view but not on a text field? Any ideas why is this occuring? 

Thank you

Answer: 
Your code works as-as if you wrap it in a jQuery "ready".

I mocked up a JSFiddle of your page here: 

<http://jsfiddle.net/NEest/>
----------------------------

```
jQuery(function () {
    jQuery(document.body).on('click', 'a.ajax', function () {
        var post_url = jQuery(this).attr("href");
        var post_id = jQuery(this).attr("rel");
        alert(post_url + " - " + post_id);
        jQuery("#fff").html('<div class="loading">loading...</div>');
        jQuery("#fff").load(post_url).fadeIn(500);
        return false;
    });

    jQuery("a.pclose").click(function () {
        jQuery("#fff").fadeOut();
    });
});

```

Please note: JSFiddles do not require the "ready" code as it is a built-in feature (drop-down option on left), but it does not hurt to add it for demonstration purposes.

*If you can update the JSFiddle with any remaining issues that will make it easier for everyone to help.*
All jquery plugins read the dom of the document when the page load, so n order to enable the jquery functionality on ajax loaded content you have to re initialize the jquery plugins. then your code will work.  

[Please check my answer on this post as well](https://stackoverflow.com/questions/19113999/jquery-is-not-working-on-ajaxally-loaded-data/19114178#19114178)