how click on link button of listview get hidden field value in label using c#

Total Post:29

Points:203
C# 
C#
 4924  View(s)
Ratings:
Rate this:
Hi Expert!
how click on link button of listview get hidden field value in label using c#
my line of code as following

protected void gotopage_Click(object sender, EventArgs e)
{
    HiddenField hiddenblogid = FindControl("hlinkimg") as HiddenField;
    Label1.Text = hiddenblogid.Value;
    Response.Redirect("~/blogdisplay.aspx");
}

Thanks in advance. 
  1. Post:604

    Points:4228
    Re: how click on link button of listview get hidden field value in label using c#

    Hi Andrew!


    try this

    if(request.form['yourhiddenclientsideID']!=null)
    {
    string test = request.form['yourhiddenclientsideID'];
    }

    that's work for hiddenfield not runat server if u put attribiute runat server for hidden fields u can user directive name.value to get value of field.

Answer