asp.net - Problems with GridView and HyperLinkColumn -


when using control datagrid, can use type of column:

<asp:hyperlinkcolumn datanavigateurlfield="url_doc" datatextfield="des_doc" headertext="document">                      <itemstyle horizontalalign="center"></itemstyle> </asp:hyperlinkcolumn> 

where "url_doc" come stored procedure value:

selet   '../documentos/'                   || res.cod_op                   || '/'                   || tdo.des_tipo_doc                   || '/'                   || '01'                   || '/'                   || res.file_name url_doc mytable 

url_doc stores path of document file, included in sub folder of asp.net project. when click on hyperlinkcolumn, can open document file.

now, if try use gridview, can't find column hyperlinkcolumn. when using gridview, tried use hyperlinkfield like:

<asp:hyperlinkfield                     datanavigateurlfields="url_doc"                     datatextfield="des_doc"                      datanavigateurlformatstring="url_doc"  /> 

however, when click on hyperlinkfield, program tries open file named "url_doc", not path included in variable url_doc.

any idea how proceed in case?

the datanavigateurlformatstring property gives way format url if data have id "~\details.aspx?productid={0}". if leave empty print valur bind datanavigateurlfields property instead. take @ link more msdn.


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -