repeater rebind and code on apsx page
<p>Im using repeater to display userPhotos. For loggedIn user photos I would like to have deleteButton visible and for the rest no.</p>

<p>Everything is ok on the first Load. </p>

<p>code for Visible works ok:</p>

<pre><code>Visible='&lt;%#DataBinder.Eval(Container.DataItem, "UserId").ToString() == LoggedUser.ToString() %&gt;"
</code></pre>

<p>but on the PostBack even though the same data is binded to the repeater code:</p>

<pre><code>&lt;%#DataBinder.Eval(Container.DataItem, "UserId").ToString() == LoggedUser.ToString() %&gt;"
</code></pre>

<p>always returns false.</p>

<p>Why is it like taht ?</p>

<p>I have also printed </p>

<pre><code> &lt;%= LoggedUser.ToString() %&gt;
                &lt;%#DataBinder.Eval(Container.DataItem, "UserId").ToString() %&gt;
</code></pre>

<p>and both texts are the same in both ways (with postback and without - on first page load.</p>

<p>Any suggestions ?</p>

<p>The backcode is:</p>

<pre><code>private void LoadUserPhoto(int pageNumber)
{

    LoginManager loginManager = new LoginManager();
    int loginId = loginManager.getLoggedP();

    UserPhoto userPhoto = new UserPhoto();
    List&lt;Photo&gt; photos = userPhoto.GetUserPhotos(loginId.ToString(), pageNumber, pageSize);

        rptrImages.DataSource = photos;
        rptrImages.DataBind();
    }
}
</code></pre>

<p>And on PageLoad i have only:</p>

<pre><code>if (!Page.IsPostBack)
{
   LoadUserPhoto(0);
}
</code></pre>

<p>and on buttonClick handler the same code:</p>

<pre><code>LoadUserPhoto(0);
</code></pre>
