Read dropdownlist value from a gridview
<p>I have a gridview with a dropdownlist column, and i enabled the paging function. The problem is every time after it turns to the next page, the selected value of the dropdownlist on the previous page is back to default value. </p>

<p>I tried to wrap the code with <code>if(!ispostback)</code>, only the first page available other pages are disappear</p>

<pre><code>protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            List&lt;CPDEmployee&gt; employeelist = (List&lt;CPDEmployee&gt;)Cache["EmployeeList"];

            unverifiedlist.DataSource = employeelist;
            unverifiedlist.AllowPaging = true;
            unverifiedlist.PageSize = 10;
            unverifiedlist.DataBind();
        }
    }
protected void PageSelect_SelectedIndexChanged(object sender, EventArgs e)
{
    int page = int.Parse(PageSelect.SelectedItem.Text);
    unverifiedlist.PageIndex = page;
    DataBind();
}





 &lt;asp:GridView ID="unverifiedlist" runat="server" AutoGenerateColumns="false" AllowSorting="true" AllowPaging="true" ViewStateMode="Enabled"&gt;
                        &lt;Columns&gt;&lt;asp:TemplateField HeaderText="Options" &gt;
                                &lt;ItemTemplate&gt;
                                    &lt;asp:DropDownList ID="options" runat="server" AutoPostBack="true"&gt;
                                        &lt;asp:ListItem Value="1"&gt;Verified&lt;/asp:ListItem&gt;
                                        &lt;asp:ListItem Value="0"&gt;Rejected&lt;/asp:ListItem&gt;
                                    &lt;/asp:DropDownList&gt;
                                &lt;/ItemTemplate&gt;
                             &lt;/asp:TemplateField&gt;
                    &lt;/Columns&gt;
                    &lt;PagerSettings Visible="false"/&gt;            
        &lt;/asp:GridView&gt;
&lt;asp:DropDownList ID="PageSelect" runat="server" AutoPostBack="true" OnSelectedIndexChanged="PageSelect_SelectedIndexChanged"&gt;&lt;/asp:DropDownList&gt;
</code></pre>

<p>does anyone know how to fix it, where should I put ispostback? thanks </p>
