开发者

ASP.NET Hyperlink binding multiple URL parameters

i got this code:

http://localhost:52182/ReviewRequest.aspx?requestid=254351496

where the setting behind it in the asp.net page is:

     <asp:HyperLinkField
                DataNavigateUrlFields="Request_No"
                DataNavigateUrlFormatString="ReviewRequest.aspx?requestid={0}"
                 DataTextField="Request_No"
                 HeaderText="Access Request"
                 DataTextFormatString="Review Request"
                 SortExpression="Request_No" />

the question is: in the DataNavigateUrlFormatString property in code above, what is the {0} stand for? and I want to pass开发者_JAVA技巧 another dynamically set parameter in the same URl so to look like this

http://localhost:52182/ReviewRequest.aspx?requestid=254351496&nid=xxxxxx

how can I do so?

Thanks, and help is appreciated


The {0} is the zero indexed value of the fields you have mentioned in DataNavigateUrlFields. You can pass the next field as

 <asp:HyperLinkField
                DataNavigateUrlFields="Request_No, NID"
                DataNavigateUrlFormatString="ReviewRequest.aspx?requestid={0}&nid={1}"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜