troubleshooting Question

Retrieve control text value

Avatar of GCaron
GCaron asked on
.NET Programming
19 Comments2 Solutions2790 ViewsLast Modified:
I have a Gridview that lists out a number of records displayed as labels. I am then using a button click even to redirect to another page. I would like to extract the text values from two of the labels to use as querystring values.

For example:

    protected void Button1_Click(object sender, EventArgs e)
    {
      Response.Redirect("nextPage.aspx?param1=" + control1.text + "param2=" + control2.text);
    }

How would I go about doing this? I am using C# but examples in vb.net will work as well.

Thank you
ASKER CERTIFIED SOLUTION
shahprabal

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 19 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 19 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros