开发者

Navigate to a separate browser from Gridview Hyperlink

开发者 https://www.devze.com 2023-03-23 08:37 出处:网络
Hello I would like the user to be directed to a separate browser if possib开发者_如何学JAVAle from a HyperLink in a Gridview. How can I do this.. like you know how a href blah blah target:_blank somet

Hello I would like the user to be directed to a separate browser if possib开发者_如何学JAVAle from a HyperLink in a Gridview. How can I do this.. like you know how a href blah blah target:_blank something like that.. but the problem is that I am using this..

   <asp:HyperLinkField 
DataNavigateUrlFields="myID" 
DataNavigateUrlFormatString="../names/view.aspx?myID={0}" //anyway to do it here?
DataTextField="name" 
HeaderText="Name" 
SortExpression="Name" 
ItemStyle-Width="100px"
ItemStyle-Wrap="true" 
HeaderStyle-HorizontalAlign="Left" />


Use the Target property:

<asp:HyperLinkField DataNavigateUrlFields="myID" 
                    DataNavigateUrlFormatString="../names /view.aspx?myID={0}"
                    DataTextField="name" 
                    HeaderText="Name" 
                    SortExpression="Name" 
                    ItemStyle-Width="100px" 
                    ItemStyle-Wrap="true" 
                    HeaderStyle-HorizontalAlign="Left" 
                    Target="_blank" />
0

精彩评论

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