c# - HyperLink field in Gridview (Url Navigation) -
at work there gridview , has following syntax
<asp:hyperlinkfield datanavigateurlfields="nameid" datanavigateurlformatstring="names.aspx?nameid={0}" datatextfield="name" headertext="client name" sortexpression="name" itemstyle-width="100px" itemstyle-wrap="true" />
so added line datanavigateurlformatstring... link showing address looks this
http://.....clients/clientnames/names.aspx?nameid=123
this gridview in clientsnames folder.. want use names.aspx of maintenance folder... want url redirect this
httpl//....clients/maintenance/names.aspx?nameid=123
i tried add datanavigateurlformatstring="maintenance/names.aspx?nameid={0}" instead create url this
http://......clients/clientnames/mainteanance/names.aspx?nameid=123
how can make url looks grid view?
http://.....clients/maintenance/names.aspx?nameid=123
thank you
try setting datanavigateurlformatstring "../maintenance/names.aspx?nameid={0}"
<asp:hyperlinkfield datanavigateurlfields="nameid" datanavigateurlformatstring="../maintenance/names.aspx?nameid={0}" datatextfield="name" headertext="client name" sortexpression="name" itemstyle-width="100px" itemstyle-wrap="true" />
Comments
Post a Comment