following hyperlink control after the tag in the GridView as shown below: HyperLinkField...Multiple Values: Just below the first hyperlink field, add another hyperlink field as shown below: HyperLinkField...DataNavigateUrlFields' sets the names of the fields, that is to be used to construct the URL in the HyperLinkField...CustomerID" DataSourceID="SqlDataSource1" AllowPaging="True" AllowSorting="True"> HyperLinkField...CID={0}" Text="Pass Single Value" /> HyperLinkField DataNavigateUrlFields="CustomerID, CompanyName
made use of the 'DataNavigateUrlFields' to set the names of the fields and construct the URL in the HyperLinkField
值得一提的是:GridView模板中显示为员工姓名的HyperLinkField的连接采用了上面我们定义在URL模板(employees/{name}/{id))中的模式。...server" AutoGenerateColumns="false" Width="100%"> 4: 5: HyperLinkField
GridView的RowCommand事件 CommandName:区分是哪个按钮–>e.CommandName,用于获取命令名 另外如果有“列”不想被修改,可以设置其readonly属性true 3.HyperLinkField
ID="GridViewEmployees" runat="server" AutoGenerateColumns="False" Width="100%"> 12 13 HyperLinkField
领取专属 10元无门槛券
手把手带您无忧上云