简体   繁体   中英

Open ASP.NET GridView item in new page or tab - how to?

I have a simple ASP.NET GridView......... Using ASP.NET 2.0. For some reason you cant right click on a item in a grieview and say Open in NEW tab or page. Why is that? And how can i fix this?

A lot of ASP.NET works by posting back using javascript, rather than links. I guess gridview buttons work this way. If you want to be able to right-click/New tab you will have to add a hyperlink or HTML anchor to the gridview, and supply it with the appropriate URL - you'll need to generate some way of passing the row data to the url too, such as QueryString values identifying the row.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM