HOW CLICK ON LINK BUTTON OF LISTVIEW GET HIDDEN FIELD VALUE IN LABEL USING C#

Andrew Deniel

Total Post:29

Points:203
Posted by  Andrew Deniel
C# 
C#
 4336  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. AVADHESH PATEL

    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

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!