Reading Values Returned by SQLDataSource Before Binding to FormView

Posted by peter.newhook on Stack Overflow See other posts from Stack Overflow or by peter.newhook
Published on 2010-06-14T01:55:50Z Indexed on 2010/06/14 2:02 UTC
Read the original article Hit count: 250

Filed under:
|
|

I have a FormView that shows posts by users. I'd like to add Edit and Delete commands to the post to let the original author edit or delete their post. I'd like these commands to be available to only the author. The FormView is populated by a SqlDataSource that uses a stored procedure.

I was thinking I would set the Edit and Delete hyperlink to Visible=False, then compare the currently signed in user guid to the guid of the post's author, and make the hyperlinks visible if the two guids are the same. I've tried using the Selected event of the SqlDataSource to capture the guid (which is returned by the stored procedure) however I can't find way to get the values returned by this datasource. How do I access the values returned by a SqlDataSource before they get databound?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about sqldatasource