ASP. GridView HyperLinkField Value and value "Go"

Source: Internet
Author: User

Source: http://www.cnblogs.com/junjie94wan/archive/2011/08/17/2143623.html

Often do WinForm program, for a long time did not do the web is a little rusty, the GridView value of value are not know how to use, hereby on the Internet to find some more reliable information.

Recorded for later use

Front-end code, in the GridView Add Edit column inside Add HyperLinkField, and then set HyperLinkField DataNavigateUrlFields, datanavigateurlformatstring properties

<asp:hyperlinkfield datanavigateurlfields= "Work No."
datanavigateurlformatstring= "manager.aspx?gh={0}" text= "select"/>

From the code can be seen

DataNavigateUrlFields is the property field that you want to bind the hyperlink to, which is the field on the GridView that you want to pass.

Datanavigateurlformatstring is the instruction to pass parameters to that page.

Method of extracting parameters from a page that is passed in parameters

request.querystring["GH"];

["GH"] is the parameter name is the same as above the page was passed "? "After the name

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.