This is a migrated thread and some comments may be shown as answers.

combining two field in navigateUrl using gridbound column

2 Answers 44 Views
Grid
This is a migrated thread and some comments may be shown as answers.
CHE PAK
Top achievements
Rank 1
CHE PAK asked on 05 Jul 2013, 02:52 AM
hi everybody,
I tried to make a hyperlink in gridbound template but fail..
any suggestion?
my link sholud like this : http://10.x.x.xxx:8080/<fieldname>/ITDepartment/<fieldname

NavigateUrl='<%# String.Format("http://10.x.xx.xx:8080/Databinder.Eval(Container.DataItem,"YEAR")/ITDepartment/Databinder.Eval(Container.DataItem,NAME) %>'

My database table
 
ID | YEAR |FILENAME
1 | 2011 | ALPHA.DOC
2 | 2011 | BETA.PDF
3 |2012 | TEST.DOCX


if I click the first ID the link should be http://10.x.x.xxx:8080/2011/ITDepartment/ALPHA.DOC and so on.. where the changes is fieldname1 and fieldname2.
Please guide me about this.

Thanks.

2 Answers, 1 is accepted

Sort by
0
Accepted
Jayesh Goyani
Top achievements
Rank 2
answered on 05 Jul 2013, 06:46 AM
Hello,

Please try with the below code snippet.

NavigateUrl='<%# String.Format("http://10.x.xx.xx:8080"+ "/{0}/" + "ITDepartment/" + "{1}",Eval("Year"),Eval("FILENAME"))%>'


Thanks,
Jayesh Goyani
0
CHE PAK
Top achievements
Rank 1
answered on 05 Jul 2013, 08:52 AM
Thanks it's working ..
Tags
Grid
Asked by
CHE PAK
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
CHE PAK
Top achievements
Rank 1
Share this question
or