This topic is locked
[SOLVED]

  Creating link in the List View

10/1/2010 3:12:52 PM
ASPRunnerPro General questions
S
sfkjeld author

My first ASP Runner project in about a year. I think I used to know how to do this, but cannot remember now.... I want to create a URL in one of the columns in a list view. I can't seem to remember how to get the value of a field in the record being diplayed. Tried rs("ID") and values("ID"). Can you remind me again how to access a field in the record?
Trying to write something like <a href="mypage.asp?ID=rs("ID")">{$PatientName_value}</a>
Thanks

Sergey Kornilov admin 10/1/2010

Set 'View as' type of any field to 'Custom' to make it appear as a link:

http://xlinesoft.com/asprunnerpro/docs/_view_as__settings_custom.htm

S
sfkjeld author 10/1/2010



Set 'View as' type of any field to 'Custom' to make it appear as a link:

http://xlinesoft.com/asprunnerpro/docs/_view_as__settings_custom.htm


Thanks. I apologize for not being clearer. I am trying to wrap an anchor tag around the PatientName in a list view. But I need the record's "ID" in the URL. I don't know who to access that record's "ID" to form the URL. Data("ID") did not work.
I was going put the code in the via the HTML mode on the List View. I could also do it in a code snippet, but again, I don't know how to access the record's "ID" or the "PatientName".
Thanks again.

Sergey Kornilov admin 10/1/2010

You need to set 'View as' type of PatientName field to 'Custom' and modify custom code to build a proper hyperlink.
http://xlinesoft.com/asprunnerpro/docs/_view_as__settings_custom.htm

Check manual topic I posted to see how you can access other field values. Example 5 is very close to what you looking for.

S
sfkjeld author 10/1/2010

Got it! Thanks.



Thanks. I apologize for not being clearer. I am trying to wrap an anchor tag around the PatientName in a list view. But I need the record's "ID" in the URL. I don't know who to access that record's "ID" to form the URL. Data("ID") did not work.
I was going put the code in the via the HTML mode on the List View. I could also do it in a code snippet, but again, I don't know how to access the record's "ID" or the "PatientName".
Thanks again.