In order to determine the correct row index you should place your button inside of your ListView.ItemTemplate
and handle the ListView.ItemCommand
event.
In order to implement this approach you would have to change your code as follows:
<asp:ListView ID="lvArticle" runat="server" OnItemCommand="lv_ItemCommand">
..
<ItemTemplate>
<asp:HiddenField ID="hfBlogID" Value='<%#Eval("BlogID")%>' runat="server" />
<p>
<%#Eval("BlogTitle")%></p>
<p>
<%#Eval("BlogDetails")%></p>
<asp:Button runat="server" CommandName="find" CommandArgument='<%# Eval("yourIDField") %>' />
</ItemTemplate>
...
In code behind:
protected void lv_ItemCommand(object sender, ListViewCommandEventArgs e)
{
switch (e.CommandName)
{
case "find":
var hidden = e.Item.FindControl("your hidden id") as HiddenField;
break;
}
}
If your button is not inside your ListView, then you would need a way to identify the row you want to extract the hidden value from.
For example, if you allow to select a row in your ListView
then you could get the hidden value from the selected row as follows:
protected void find_Click(object sender, EventArgs e)
{
var hidden = this.lv.Items[this.lv.SelectedIndex].FindControl("your hidden ID") as HiddenField;
}