mardi 4 août 2015

How to pass tSQL CONCAT string result to GridView BoundField Column?

I'm trying to get a SQL string result from CONCAT to a GridView Column. Is there a way to grab fullName for a column DataField?

Every answer I can find on the internet says to use a template field in asp.net. What if I want to use a stored procedure?

Perhaps I don't know correct terminology, but there is no answer to this on stackoverflow.

SELECT 
    CASE
       WHEN IsNull(Table.firstName, '') = ''
         THEN CONCAT(Table.lastName, ', ', Table.firstName) 
         ELSE Table.lastName
    END as **fullName**, 
    Table.website



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire